Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Components
Inheritance Hierarchy
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Components/ComboBoxKey.h |
| Include | #include "Components/ComboBoxKey.h" |
Syntax
UCLASS (Meta=(DisplayName="ComboBox (Key)"), MinimalAPI)
class UComboBoxKey : public UWidget
Remarks
The combobox allows you to display a list of options to the user in a dropdown menu for them to select one. Use OnGenerateConentWidgetEvent to return a custom built widget.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bEnableGamepadNavigationMode | When false, directional keys will change the selection. | |
| bool | bHasDownArrow | When false, the down arrow is not generated and it is up to the API consumer to make their own visual hint that this is a drop down. | |
| bool | bIsFocusable | When true, allows the combo box to receive keyboard focus | |
| FMargin | ContentPadding | ||
| FSlateColor | ForegroundColor | The foreground color to pass through the hierarchy. | |
| FTableRowStyle | ItemStyle | The item row style. | |
| float | MaxListHeight | The max height of the combobox list that opens | |
| FGenerateWidgetEvent | OnGenerateContentWidget | Called when the widget is needed for the content. | |
| FGenerateWidgetEvent | OnGenerateItemWidget | Called when the widget is needed for the item. | |
| FOnOpeningEvent | OnOpening | Called when the combobox is opening | |
| FOnSelectionChangedEvent | OnSelectionChanged | Called when a new item is selected in the combobox. | |
| FScrollBarStyle | ScrollBarStyle | The scroll bar style. | |
| FComboBoxStyle | WidgetStyle | The combobox style. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UComboBoxKey () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddOption
(
FName Option |
Add an element to the option list. | |
| void | ClearOptions () |
Remove all the elements of the option list. | |
| void | Clear the current selection. | ||
| FMargin | Get the padding for content. | ||
| FSlateColor | Get the foreground color of the button. | ||
| const FTableRowStyle & | GetItemStyle () |
Get the style of the items. | |
| float | Get the maximum height of the combobox list. | ||
| const FScrollBarStyle & | Get the style of the scrollbar. | ||
| FName | Get the current selected option | ||
| const FComboBoxStyle & | Get the style of the combobox. | ||
| void | InitForegroundColor
(
FSlateColor InForegroundColor |
Initialize ForegroundColor in the constructor before the SWidget is constructed. | |
| void | InitIsFocusable
(
bool InIsFocusable |
Initialize IsFocusable in the constructor before the SWidget is constructed. | |
| void | InitScrollBarStyle
(
const FScrollBarStyle& InScrollBarStyle |
Initialize the scrollbar style in the constructor before the SWidget is constructed. | |
| bool | Is the combobox navigated by gamepad. | ||
| bool | IsFocusable () |
Is the combobox focusable. | |
| bool | Is the combobox arrow showing. | ||
| bool | IsOpen () |
Is the combobox menu opened. | |
| bool | RemoveOption
(
FName Option |
Remove an element to the option list. | |
| void | SetContentPadding
(
FMargin InPadding |
Set the padding for content. | |
| void | SetEnableGamepadNavigationMode
(
bool InEnableGamepadNavigationMode |
Set whether the combobox is navigated by gamepad. | |
| void | SetHasDownArrow
(
bool InHasDownArrow |
Set whether the combobox arrow is showing. | |
| void | SetItemStyle
(
const FTableRowStyle& InItemStyle |
Set the style of the items. | |
| void | SetMaxListHeight
(
float InMaxHeight |
Set the maximum height of the combobox list. | |
| void | SetSelectedOption
(
FName Option |
Set the current selected option. | |
| void | SetWidgetStyle
(
const FComboBoxStyle& InWidgetStyle |
Set the style of the combobox. |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| const FText | Gets the palette category of the widget |
Overridden from UVisual
| Type | Name | Description | |
|---|---|---|---|
| void | ReleaseSlateResources
(
bool bReleaseChildren |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FGenerateWidgetEvent | |||
| FOnOpeningEvent | |||
| FOnSelectionChangedEvent |