TWebListBox
Description
Below is a list of the most important properties methods and events for TWebListBox
. A TWebListBox
is a control having a list of (text) items, similar to a VCL TListBox
.
 |
 |
Designtime |
Runtime |
HTML template tag
The HTML tag the component can be associated with in an HTML template. Assign the ID
attribute with a unique value and set the identical value to the ElementID
property. Detailed
information can be found in the Use of HTML templates topic.
HTML tag |
<SELECT ID=”UniqueID”></SELECT> |
ElementID |
UniqueID |
The items in the listbox are mapped onto HTML OPTION elements of the SELECT element. This means there is also the capability to take advantage of the Name/Value settings of the OPTON element. This can be done by adding items via a Name/Value pair, i.e. text that is separated by the default NameValueSeparator "=". If this is not desired, set WebListBox.Items.NameValueSeparator to #0.
Properties for TWebListBox
Property |
Description |
BorderStyle |
Sets the border style for the control |
ElementClassName |
Optionally sets the CSS classname for the date/time picker when styling via CSS is used |
ElementID |
Optionally sets the HTML element ID for a HTML element in the form HTML file the date picker needs to be connected with. When connected, no new date picker is created but the Delphi class is connected with the existing HTML element in the form HTML file |
Enabled |
Sets whether the control is enabled or disabled |
ItemHeight |
Sets the height of individual items in the listbox |
ItemIndex |
Sets or gets the index of the selected item |
Items |
Access to the items in the listbox as a TStringList |
MultiSelect |
When true , multiple items can be selected in the listbox |
ShowFocus |
When true , the border color changes when the control has focus |
TabOrder |
Sets the tab order of the control |
TabStop |
When true , the focus is turned to the control when pressing tab |
TextDirection |
Sets the text direction to
tdDefault : does not use direction attribute
tdInherit : uses TextDirection of parent control
tdRightToLeft : uses rtl direction attribute
tdLeftToRight : uses ltr direction attribute |
Values[AIndex: integer]: string |
Sets or gets the value attribute of the listbox OPTION element |
Events for TWebListBox
Property |
Description |
OnChange |
Event triggered when the selected item changes in the listbox |
OnClick |
Event triggered when the listbox is clicked |
OnDblClick |
Event triggered when the listbox is double-clicked |
OnEnter |
Event triggered when the control gets focus |
OnExit |
Event triggered when focus leaves the control |