# SelectionFormField Class

> An object of the SelectionFormField class represents a combobox or a drop-down list on a form. It can be initially empty and it can have a horizontal extension, when it is empty. Depending on the Editable property the SelectionFormField either is a combobox or a drop-down list.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `TXTextControl.TextField` › `TXTextControl.FormField`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > SelectionFormField Class
- **1059 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/llms-full.txt

---

### Description

An object of the SelectionFormField class represents a combobox or a drop-down list on a form. It can be initially empty and it can have a horizontal extension, when it is empty. Depending on the [Editable](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textfield/editable-property/llms-full.txt) property the SelectionFormField either is a combobox or a drop-down list.

### Syntax

```csharp
public class SelectionFormField : FormField
```

```vbnet
Public Class SelectionFormField
    Inherits FormField
```

### Examples

The following example adds a country selector to a fillable form.

```csharp
SelectionFormField selectionFormField = new(new[] { "Germany", "United Kingdom", "United States" }, 0) { Name = "Country" };
textControl.FormFields.Add(selectionFormField);
```

```vbnet
Dim selectionFormField As New SelectionFormField(New String() { "Germany", "United Kingdom", "United States" }, 0) With { .Name = "Country" }
textControl.FormFields.Add(selectionFormField)
```

---

## In This Section

- [SelectionFormField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/constructor/llms-full.txt): Initializes a new instance of the SelectionFormField class.
- [SelectionFormField.EmptyWidth Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/emptywidth-property/llms-full.txt): Gets or sets the horizontal extension, in twips, of the SelectionFormField, when there is no selected item.
- [SelectionFormField.IsDropDownArrowVisible Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/isdropdownarrowvisible-property/llms-full.txt): Gets or sets a value indicating wheather a dropdown arrow is shown so that the user can select an item.
- [SelectionFormField.Items Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/items-property/llms-full.txt): Gets or sets a list of items for the SelectionFormField. An item must not be an empty string.
- [SelectionFormField.SelectedIndex Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/selectedindex-property/llms-full.txt): Gets or sets the index of the selected item of the SelectionFormField. If the property value is -1, no item is selected and the currently selected item is deselected.

---

## Nearby

- **Previous:** [Selection.Underline Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/underline-property/llms-full.txt)
- **Next:** [SelectionFormField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selectionformfield/constructor/llms-full.txt)
