Skip to content

TWebLookupComboBox

Description

Below is a list of the most important properties methods and events for TWebLookupComboBox. A TWebLookupComboBox is a control having a list of (text) items, similar to a VCL TComboBox.

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 <DIV ID=”UniqueID”></DIV>
ElementID UniqueID

Add DisplayText/Value pairs to the TWebLookupCombobox with

TWebLookupCombobox.LookupValues.AddPair(AValue, ADisplayText);

Properties for TWebLookupComboBox

Property Description
DisplayText: string Public property returning the selected item DisplayText
ElementClassName Optionally sets the CSS classname for the label when styling via CSS is used
ElementID Optionally sets the HTML element ID for a HTML element in the form HTML file the label needs to be connected with. When connected, no new label is created but the Delphi class is connected with the existing HTML element in the form HTML file
ItemIndex Sets or gets the index of the selected item
LookupValues Access to a collection of items of the TWebLookupComboBox where each item has DisplayText: string and Value: string property.
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
Text Gets or sets the selected value in the combobox
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
Value: string Public property returning the selected item value.

Events for TWebLookupComboBox

Event 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 doubleclicked
OnEnter Event triggered when the control gets focus
OnExit Event triggered when focus leaves the control