Multi-Column List Box


By including the %C=column width% directive in the definition of the list box control, you can specify that the list box should be displayed in multiple columns. For example, the following specifies a list box control that has 3 columns, each 30 characters wide (the list box width is 90 characters).


To turn on horizontal scrolling, use the H directive in the format string. For example:


As you can see in the above example, when you have multiple directives in a format string, you separate them with a semi-colon. In the following example, we convert the list box to 3 columns, and enable horizontal scrolling.

cities = "Atlanta,New York,Los Angeles,Boston,Johannesburg,Sydney,Perth,Adelaide,Brisbane,"
cities = cities + "Darwin,Melbourne,Cape Town,Pretoria,Bloemfontein,Bethlehem,Tel Aviv,Jerusalem,"
cities = cities + "Little Rock,Paris,London,Munich,Nice,Frankfurt,Berlin,Athens,Barcelona,Madrid"
cities = stritran(cities,",",crlf())
dim a_cities[100] as C
ui_dlg_box("Multi-Select List Box",<<%dlg%
This variable shows what entries in the above list box are selected.;


This script creates this dialog box:



Desktop applications only

See Also