Skip to content

TWebCountryDropDown

Description

Below is a list of the most important properties methods and events for TWebCountryDropDown. A TWebCountryDropDown is a control having a list of all official countries in the world in a dropdown to select from. The TWebCountryDropDown uses SVG flag icons from CDN https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.3.1/css/flag-icon.min.css. The list of countries is automatically added. As input is typed into the edit control, the list of countries is filtered down to matching countries.

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 TWebCountryDropDown

Property Description
AutoDropDown When true, the list of countries will automatically dropdown when the edit control gets focus
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
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 selected country
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

Events for TWebCountryDropDown

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