Want to do generic programming using listboxes? So this feature is for you!
With 4D v16 R2, 20+ new listbox properties can be dynamically manipulated by code so 4D Developers now have the full control over the listbox form object! Among a long list: multi-style, wordwrap, single-click edit, truncation mode, column min & max width and much more. The properties apply to the entire list box, its columns, or both.
No more property available only in Design Mode through the Property List: every single property can now be set and get using 2 commands: LISTBOX SET PROPERTY and LISTBOX Get property.
This feature is very useful for generic programming of forms and components. Let’s take an example: when a list box is empty (no columns nor data) and you create columns dynamically using the 4D Language (LISTBOX Insert column, LISTBOX Duplicate column) or SQL statements (Select * from… into “Listbox”), you want to define the settings for each column according to their content type. It is now possible for you to define every single property for each column, as if you were in design mode!
The below example database demonstrates how the new LISTBOX SET PROPERTY and LISTBOX Get property commands work with all these new properties (over 20) plus a couple of “old” ones that can now be set too (and not only get) using these powerful commands:
For more details, please refer to the language reference manual.