Skip to main content
All docs
V24.2

Country Chooser

  • 2 minutes to read

The Country Chooser (CountryChooser) is a drop-down editor that allows users to quickly and easily choose from over 200 countries.

Country Chooser - WinForms UI Templates | DevExpress

The Country Chooser inherits the basic functionality from the DevExpress LookUpEdit and operates in the Auto Suggest search mode, which dynamically changes the editor’s data source as users enter text. It highlights all portions of item captions that match user text.

Obtain Selected Country

Use the editor’s Country or EditValue property to get or set the country.

string country = countryChooser1.Country;
object objCountry = countryChooser1.EditValue;

Press Ctrl+Del to clear the editor’s value.

Field Labels & Prompt Text

Use the HeaderLabel, FooterLabel, and Placeholder properties to specify the corresponding labels and prompt text.

Country Chooser Labels - WinForms UI Templates | DevExpress

countryChooser1.HeaderLabel = "Country";
countryChooser1.FooterLabel = "*This field is required.";
countryChooser1.Placeholder = "Choose your location...";

Show Custom Leading Icon

Use the LeadingIconOptions property to specify a custom leading icon that is displayed within the edit box until the user selects a country.

Country Chooser Leading Icon - WinForms UI Templates, DevExpress

Tooltips & Hints

When a user hovers the mouse pointer over the leading icon, the Country Chooser displays a tooltip with country details, which includes the continent, capital of the country, and the currency.

Country Chooser Hint - WinForms UI Templates, DevExpress

If no country is selected, the Country Chooser displays its generic hint. Use the ToolTip, ToolTipTitle, and ToolTipIconType properties to configure the generic hint.

Turn off the ShowCountryToolTip option to disable country tooltips.