Skip to content

TWebDropDownControl

Description

TWebDropDownControl is a control that allows any other control to appear in a dropdown when the dropdown button is clicked. This control in the dropdown is typically used to perform a selection that is then visualized in the always visible part of the control. The size of the dropdown part is equal to the size (width/height) of the control in the dropdown.

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

Properties for TWebDropDownControl

Property Description
AutoDropDown: Boolean When true, the dropdown will automatically show when it gets focus
BorderStyle Sets the border style for the control
DropDownColor: TColor Sets the background color of the dropdown
DropDownHeight: Integer Sets the height of the dropdown part when different from zero. Otherwise, it uses the height of the control assigned as dropdown control.
DropDownShadow: Boolean When true, the dropdown is displayed with a shadow
DropDownWidth: Integer Sets the width of the dropdown part when different from zero. Otherwise, it uses the width of the control assigned as dropdown control.
ElementClassName Optionally sets the CSS classname for the date/time picker when styling via CSS is used
ElementInputClassName Sets the CSS classname for the input control used in the dropdown control
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 listbox 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
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 text to display in the always visible part of the dropdown control

Events for TWebDropDownControl

Event Description
OnClick Event triggered when the listbox is clicked
OnCloseUp Event triggered when the dropdown closes
OnDblClick Event triggered when the listbox is doubleclicked
OnDropDown Event triggered when the dropdown is displayed
OnEnter Event triggered when the control gets focus
OnExit Event triggered when focus leaves the control