KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: ListBox Row Level Control
PRODUCT: 4D | VERSION: 15 R4 | PLATFORM: Mac & Win
Published On: February 18, 2016

4Dv15R4 introduces a new property for progamatic Listbox Control. This feature is only available for array based listboxes. Under the "List Box" section of the properties window is a new property "Row Control Array." The arrays position and row number will match up and assigning a value to the position in the array will apply an effect to the row.

There are three constants for the "List Box" theme that will apply an effect on the rows:

    -Listbox row is hidden (1):
    -Listbox row is disabled (2)
    -Listbox row is not selectable (4)

Without applying any properties the default is 0, so none of the properties above are applied.

This new feature allows more control over listboxes on a row level which can also be done programatically.
For example, to disable a row and have it not selectable set the value of the associated lontint in the array to 2+4 or use the constants.

lbControl_al{4}:=2+4
//Disable and make the 4th row in the Listbox not selectable
lbControl_al{10}:=Listbox row is disabled+Listbox row is not selectable
//Disable and make the 4th row in the Listbox not selectable