Starting with 4D v16, you can set a different row height for each row in your list box. So with a few lines of code, you have a list box with rows that conform to the content. With this 4D v16 feature, we gave full control to the developer to precisely define the height for every single row of the list box.
With 4D v16 R5, we’ve decided to go further, and provide you with a fully automatic mode. It’s now possible to display lists in a gorgeous interface without any programming. You only need to set a few properties in the list box, and 4D does the rest for you. It’s magical, fluid, and again … not a single line of code!
When list boxes are based on arrays, the automatic row height feature allows them to automatically adapt the height of each row to its content. This is so the full text or picture can be displayed.
Columns can either be taken into account or ignored when it comes to row height calculation. Limits definition is possible with either pixels, lines or both (e.g., min: 2 lines, max 200 pixels).
List box new properties
Three new settings can be easily defined thanks to the Property List. They allow developers to define whether the list box uses the automatic row height mode as well as the minimum and maximum height that a row can be.
These settings can also be managed by programming when dynamic interface settings are needed:
LISTBOX SET PROPERTY (*;"LB";lk auto row height;lk yes)
LISTBOX SET AUTO ROW HEIGHT (*;"LB"; lk row min height; 2; lk lines)
LISTBOX SET AUTO ROW HEIGHT (*;"LB"; lk row max height; 100; lk pixels)
To do so, the LISTBOX SET PROPERTY command has been updated to support the new lk auto row height selector. We have also create a new command, LISTBOX SET AUTO ROW HEIGHT, to set the minimum and maximum heights for a list box with an automatic row height.