We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

A little help with UI_LISTFIELD / UI_LISITEM

andrecarmo
Contributor

Hi folks.

 

Does anyone know if there is any way to control the width of the columns in a UI_LISTFIELD? Or at least a way where the field name text appears all over (not the column name 😉).

 

andrecarmo_0-1649095468657.png

 

And does anyone else notice that it appears differently in the preview of the programming environment and in the object choice window? The dimensions are never the same.

 

Thanks

Best regards,
Com os melhores cumprimentos,

Intel Xeon E5-1620 v4 3.5GHz 16Gb RAM, NVIDIA Quadro P2000 5Gb - Windows 10 - AC24
6 REPLIES 6
Zsuzsanna Bori
Graphisoft
Graphisoft

Hi!

 

Without your code, I'm not sure if I understood the problem correctly, but I will try to help you the best I can, but a code snippet would be appreciated for more accurate solution. 🙂

With the UI_LISTFIELD command you can define a scrollable list for your parameters. This listfield has x, y coordinates and also width and height (and optionally other stuff as well, see here ). 

The UI_LISTITEM command will help you put your parameters into the defined listfield.

The width of the individual columns cannot be defined, but if you set the listfield's width correctly, your text should be fully visible.

I'm not sure what you mean by column name in your second question. Could you be more specific? 

An important thing to mention is that the preview UI is a bit different, because the page cannot be resized, meanwhile when you open the object's ui, you will see that the window is resizeable, and everything on it is mostly responsive, including the GDL page containing listfields and listitems (other GDL UIs are not, they have fixed dimensions).

ZsuzsannaBori_0-1649163071451.png

Hopefully, I answered most of your questions. 🙂 

 

His issue is clearly that the first column can't be read properly.

I have not tested it, but from the screenshot it does look like that the columns are not user resizable when the description and value header texts are empty strings.

Together with the very low overall size of the UI_LISTFIELD causes the first column to be unreadable (all params saying "test..." instead of something distinguishable).

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
andrecarmo
Contributor

Thanks for you answer @Zsuzsanna Bori and @runxel 

 

I forgot to show the code. Its a very simple, I only have 2 columns (Drawer, Height) with no icons. So, that being so narrow I thought "I dont need use all window width for that". I used only half-window width (between 250 and 470), but in preview the second column does not appear, nor does the scroll bar. Please pay attention to height.

 

 UI_LISTFIELD 1, 250, 85, 200, 160, 0, "", ""
FOR n = 1 to drawQtd
ui_listitem n, 1, "drawHeight"+STR(n,1,0), 0, 0, "Drawer "+STR(n,1,0)
NEXT n

 

andrecarmo_4-1649172531289.png

The preview

 

andrecarmo_3-1649172290078.png

The result

 

Now we can see both columns (the widths are wrong) and scroll bar, but the height is also different.

 

Anyway, after a lot of attempts I understood that UI_LISTFIELD only works properly if you use all window width. Or, more than half-window at least.

 

Thanks!!

Best regards,
Com os melhores cumprimentos,

Intel Xeon E5-1620 v4 3.5GHz 16Gb RAM, NVIDIA Quadro P2000 5Gb - Windows 10 - AC24
runxel
Legend

Well, there is actually much more to this story!

See this comment from Péter Baksa.

 


The UI_LISTFIELD control has a feature that it can grow automatically with the dialog size if it's right side is beyond 444. This limit hasn't changed, so it is not possible to create a listfield with its right side between 444-480.

You might have encountered this special behavior here, unbeknownst to you.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

I think it is more complex than we believe @Runa , I moved the field to left and I had the same problem.

After some tests I realized that the preview completely ignores any length over then 20 at right side. But its okay if everything is okay in the end.

andrecarmo_0-1649178417649.png

 

But at the result, the box fitted perfectly, but still with the same column width problem. Even using the headers, you cannot resize the columns. This is very annoying.

andrecarmo_1-1649178825733.png

 

My conclusion is that no matter what field size you try, if it is smaller than the full width of the window, you will have an error 😒

 

Thanks!

Best regards,
Com os melhores cumprimentos,

Intel Xeon E5-1620 v4 3.5GHz 16Gb RAM, NVIDIA Quadro P2000 5Gb - Windows 10 - AC24
Lingwisyer
Guru

The command has a fixed amount of white space to the right margin? What on earth is the point of that...

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!