ListBox
The ListBox control represents a list of items from which users can select one or more entries.
Properties
- AllowMultiSelect:Â A boolean value representing whether or not users can select multiple items. If this is true, the GetSelection method will return an array rather than a single item.
- Editor:Â Provides read-only access to the underlying editor control this class manages.
- Enabled:Â A boolean value representing whether or not the control is enabled. Disable controls still display on the form, but do not react to any user actions.
- FieldName:Â A string representing the name of the field. This can be used for retrieving the control.
- Focused:Â A boolean value representing whether or not this field currently has input focus. Setting this value to true will focus the control.
- Label:Â A string representing the label that should be displayed beside the field on the form.
- LabelVisible:Â A boolean value representing whether or not the label should be displayed.
- TypeName:Â A string representing the full name of the control type.
Methods
- Focus():Â This method causes input focus to be given to the control. Calling this function behaves the same as setting the control's Focused value to true.
AddItem(string value):Â Adds a string to the list.
Direction Name Description input value The value to be added to the list. GetSelection():Â Retrieves the currently selected item or items from the list box. If AllowMultiSelect is set to true, the return value will be an array containing all of the selected items (even if there is only one selected item). Otherwise, only the single selected item will be returned.
Direction Name Description output object Either a string representing the selected item,or, if AllowMultiSelect is set to true, an array containing all of the selected items.