A list box is used to select one or more of a list of strings. The strings are displayed in a scrolling box, with the selected string(s) marked in reverse video. A list item can be single selection (if an item is selected, the previous selection is removed) or multiple selection (clicking an item toggles the item on or off independently of other selections).
Whenever the selection in a list box is changed by the user, the list box's callback procedure is invoked. (The callback procedure is provided as an initialization argument when the list box is created.)
List box choices are numbered from 0.
See also wx:choice%.
If func is not null, it is used as the callback for the list box when the selection is changed by the user.
If label is not null, it will be used as the list box label. Otherwise, the list box will not have a label. The label string can mark a character of the label as the Windows shortcut by preceding the key with an ampersand (``&''). Ampersands are stripped from label before it is used as a label. Double ampersands are converted to a single (unstripped) ampersand.
The multiple-selection argument is one of the following:
The parameters x and y are used to specify an absolute position for the list box within the panel; if -1 is provided, a default position will be assigned such that the list box is placed next to the last item inserted into the panel. If width or height is -1, an appropriate size will be used for the list box based on the list items.
The style argument is reserved for future use.
The style argument is any bitwise-ior combination of the following:
The constant wx:const-needed-sb is equal to 0.
The name argument is used to associate a name with the list box, allowing the application user to set X Windows resource values for each individual list box.