# PopupField

> Construct a PopupField.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine.UIElements](/engine/6000.6/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## PopupField()

Construct a PopupField.

```csharp
public PopupField()
```

## PopupField(string)

Construct a PopupField.

```csharp
public PopupField(string label = null)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

## PopupField(List\<T>, T, Func\<T, string>, Func\<T, string>)

Construct a PopupField.

```csharp
public PopupField(List<T> choices, T defaultValue, Func<T, string> formatSelectedValueCallback = null, Func<T, string> formatListItemCallback = null)
```

### Parameters

**** (\[List\<T>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): **** (T): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)):&#x20;

## PopupField(string, List\<T>, T, Func\<T, string>, Func\<T, string>)

Construct a PopupField.

```csharp
public PopupField(string label, List<T> choices, T defaultValue, Func<T, string> formatSelectedValueCallback = null, Func<T, string> formatListItemCallback = null)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[List\<T>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): **** (T): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)):&#x20;

## PopupField(List\<T>, int, Func\<T, string>, Func\<T, string>)

Construct a PopupField.

```csharp
public PopupField(List<T> choices, int defaultIndex, Func<T, string> formatSelectedValueCallback = null, Func<T, string> formatListItemCallback = null)
```

### Parameters

**** (\[List\<T>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)):&#x20;

## PopupField(string, List\<T>, int, Func\<T, string>, Func\<T, string>)

Construct a PopupField.

```csharp
public PopupField(string label, List<T> choices, int defaultIndex, Func<T, string> formatSelectedValueCallback = null, Func<T, string> formatListItemCallback = null)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[List\<T>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): **** (\[Func\<T, string>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)):&#x20;
