Navigation
API > API/Runtime > API/Runtime/UMG
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.
| Name | UComboBoxKey |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/ComboBoxKey.h |
| Include Path | #include "Components/ComboBoxKey.h" |
Syntax
UCLASS (Meta=(DisplayName="ComboBox (Key)"), MinimalAPI)
class UComboBoxKey : public UWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UComboBoxKey
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UComboBoxKey() |
Components/ComboBoxKey.h |
Classes
| Name | Remarks |
|---|---|
| FGenerateWidgetEvent | |
| FOnOpeningEvent | |
| FOnSelectionChangedEvent |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnableGamepadNavigationMode | bool | When false, directional keys will change the selection. | Components/ComboBoxKey.h |
|
| bHasDownArrow | bool | 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. | Components/ComboBoxKey.h |
|
| bIsFocusable | bool | When true, allows the combo box to receive keyboard focus | Components/ComboBoxKey.h |
|
| ContentPadding | FMargin | Components/ComboBoxKey.h |
|
|
| ForegroundColor | FSlateColor | The foreground color to pass through the hierarchy. | Components/ComboBoxKey.h |
|
| ItemStyle | FTableRowStyle | The item row style. | Components/ComboBoxKey.h |
|
| MaxListHeight | float | The max height of the combobox list that opens | Components/ComboBoxKey.h |
|
| OnGenerateContentWidget | FGenerateWidgetEvent | Called when the widget is needed for the content. | Components/ComboBoxKey.h |
|
| OnGenerateItemWidget | FGenerateWidgetEvent | Called when the widget is needed for the item. | Components/ComboBoxKey.h |
|
| OnOpening | FOnOpeningEvent | Called when the combobox is opening | Components/ComboBoxKey.h |
|
| OnSelectionChanged | FOnSelectionChangedEvent | Called when a new item is selected in the combobox. | Components/ComboBoxKey.h |
|
| ScrollBarStyle | FScrollBarStyle | The scroll bar style. | Components/ComboBoxKey.h |
|
| WidgetStyle | FComboBoxStyle | The combobox style. | Components/ComboBoxKey.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ComboBoxContent | TSharedPtr< SBox > | A shared pointer to a container that holds the combobox content that is selected | Components/ComboBoxKey.h | |
| MyComboBox | TSharedPtr< SComboBox< FName > > | A shared pointer to the underlying slate combobox | Components/ComboBoxKey.h | |
| Options | TArray< FName > | Components/ComboBoxKey.h |
|
|
| SelectedOption | FName | Components/ComboBoxKey.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddOption
(
FName Option |
Add an element to the option list. | Components/ComboBoxKey.h |
|
void ClearOptions() |
Remove all the elements of the option list. | Components/ComboBoxKey.h |
|
void ClearSelection() |
Clear the current selection. | Components/ComboBoxKey.h |
|
FMargin GetContentPadding() |
Get the padding for content. | Components/ComboBoxKey.h | |
FSlateColor GetForegroundColor() |
Get the foreground color of the button. | Components/ComboBoxKey.h | |
const FTableRowStyle & GetItemStyle() |
Get the style of the items. | Components/ComboBoxKey.h | |
float GetMaxListHeight() |
Get the maximum height of the combobox list. | Components/ComboBoxKey.h | |
const FScrollBarStyle & GetScrollBarStyle() |
Get the style of the scrollbar. | Components/ComboBoxKey.h | |
FName GetSelectedOption() |
Get the current selected option | Components/ComboBoxKey.h |
|
const FComboBoxStyle & GetWidgetStyle() |
Get the style of the combobox. | Components/ComboBoxKey.h | |
bool IsEnableGamepadNavigationMode() |
Is the combobox navigated by gamepad. | Components/ComboBoxKey.h | |
bool IsFocusable() |
Is the combobox focusable. | Components/ComboBoxKey.h | |
bool IsHasDownArrow() |
Is the combobox arrow showing. | Components/ComboBoxKey.h | |
bool IsOpen() |
Is the combobox menu opened. | Components/ComboBoxKey.h |
|
bool RemoveOption
(
FName Option |
Remove an element to the option list. | Components/ComboBoxKey.h |
|
void SetContentPadding
(
FMargin InPadding |
Set the padding for content. | Components/ComboBoxKey.h | |
void SetEnableGamepadNavigationMode
(
bool InEnableGamepadNavigationMode |
Set whether the combobox is navigated by gamepad. | Components/ComboBoxKey.h | |
void SetHasDownArrow
(
bool InHasDownArrow |
Set whether the combobox arrow is showing. | Components/ComboBoxKey.h | |
void SetItemStyle
(
const FTableRowStyle& InItemStyle |
Set the style of the items. | Components/ComboBoxKey.h | |
void SetMaxListHeight
(
float InMaxHeight |
Set the maximum height of the combobox list. | Components/ComboBoxKey.h | |
void SetSelectedOption
(
FName Option |
Set the current selected option. | Components/ComboBoxKey.h |
|
void SetWidgetStyle
(
const FComboBoxStyle& InWidgetStyle |
Set the style of the combobox. | Components/ComboBoxKey.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/ComboBoxKey.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/ComboBoxKey.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void InitForegroundColor
(
FSlateColor InForegroundColor |
Initialize ForegroundColor in the constructor before the SWidget is constructed. | Components/ComboBoxKey.h | |
void InitIsFocusable
(
bool InIsFocusable |
Initialize IsFocusable in the constructor before the SWidget is constructed. | Components/ComboBoxKey.h | |
void InitScrollBarStyle
(
const FScrollBarStyle& InScrollBarStyle |
Initialize the scrollbar style in the constructor before the SWidget is constructed. | Components/ComboBoxKey.h |