Navigation
API > API/Runtime > API/Runtime/Slate
A combo box that shows arbitrary content.
| Name | SComboBox |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SComboBox.h |
| Include Path | #include "Widgets/Input/SComboBox.h" |
Syntax
template<typename OptionType>
class SComboBox : public SComboButton
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SPanel → SMenuAnchor → SComboButton → SComboBox
- FSlateControlledConstruction → SWidget → SPanel → SMenuAnchor → SComboButton → SComboBox
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SComboBox() |
Widgets/Input/SComboBox.h |
Classes
| Name | Remarks |
|---|---|
| FSlateAccessibleComboBox | An accessible implementation of SComboBox to expose to platform accessibility APIs. |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnGenerateWidget | TSlateDelegates< OptionType >::FOnGenerateWidget | Delegate type used to generate widgets that represent Options | Widgets/Input/SComboBox.h |
| FOnSelectionChanged | TSlateDelegates< NullableOptionType >::FOnSelectionChanged | Widgets/Input/SComboBox.h | |
| ListTypeTraits | TListTypeTraits< OptionType > | Widgets/Input/SComboBox.h | |
| NullableOptionType | TListTypeTraits< OptionType >::NullableType | Widgets/Input/SComboBox.h | |
| SComboListType | SListView< OptionType > | Type of list used for showing menu options. | Widgets/Input/SComboBox.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bControllerInputCaptured | bool | Holds a flag indicating whether a controller/keyboard is manipulating the combobox's value. | Widgets/Input/SComboBox.h | |
| ComboBoxMenuContent | TSharedPtr< SBox > | Widgets/Input/SComboBox.h | ||
| ComboBoxStyle | const FComboBoxStyle * | The combo box style to use. | Widgets/Input/SComboBox.h | |
| ComboListView | TSharedPtr< SComboListType > | The ListView that we pop up; visualized the available options. | Widgets/Input/SComboBox.h | |
| CustomScrollbar | TSharedPtr< SScrollBar > | The Scrollbar used in the ListView. | Widgets/Input/SComboBox.h | |
| EnableGamepadNavigationMode | bool | Use activate button to toggle ListView when enabled. | Widgets/Input/SComboBox.h | |
| ItemStyle | const FTableRowStyle * | The item style to use. | Widgets/Input/SComboBox.h | |
| MenuRowPadding | FMargin | The padding around each menu row | Widgets/Input/SComboBox.h | |
| OnComboBoxOpening | FOnComboBoxOpening | Delegate to invoke before the combo box is opening. | Widgets/Input/SComboBox.h | |
| OnGenerateWidget | FOnGenerateWidget | Delegate to invoke when we need to visualize an option as a widget. | Widgets/Input/SComboBox.h | |
| OnSelectionChanged | FOnSelectionChanged | Delegate that is invoked when the selected item in the combo box changes | Widgets/Input/SComboBox.h | |
| PressedSound | FSlateSound | The Sound to play when the button is pressed | Widgets/Input/SComboBox.h | |
| SelectedItem | NullableOptionType | The item currently selected in the combo box | Widgets/Input/SComboBox.h | |
| SelectionChangeSound | FSlateSound | The Sound to play when the selection is changed | Widgets/Input/SComboBox.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearItemsSource() |
Clears current item source | Widgets/Input/SComboBox.h | |
void ClearSelection() |
Widgets/Input/SComboBox.h | ||
void Construct
(
const FArguments& InArgs |
Construct the widget from a declaration | Widgets/Input/SComboBox.h | |
NullableOptionType GetSelectedItem() |
Widgets/Input/SComboBox.h | ||
void InvalidateItemStyle() |
Widgets/Input/SComboBox.h | ||
void InvalidateStyle() |
Widgets/Input/SComboBox.h | ||
void RefreshOptions () |
Requests a list refresh after updating options Call SetSelectedItem to update the selected item if required | Widgets/Input/SComboBox.h | |
void SetEnableGamepadNavigationMode
(
bool InEnableGamepadNavigationMode |
Widgets/Input/SComboBox.h | ||
void SetItemsSource
(
const TArray< OptionType >* InListItemsSource |
Sets new item source | Widgets/Input/SComboBox.h | |
void SetItemsSource
(
TSharedRef<::UE::Slate::Containers::TObservableArray< OptionType > > InListItemsSource |
Sets new item source | Widgets/Input/SComboBox.h | |
void SetItemStyle
(
const FTableRowStyle* InItemStyle |
Widgets/Input/SComboBox.h | ||
void SetMaxHeight
(
float InMaxHeight |
Widgets/Input/SComboBox.h | ||
void SetSelectedItem
(
NullableOptionType InSelectedItem |
Widgets/Input/SComboBox.h | ||
void SetStyle
(
const FComboBoxStyle* InStyle |
Widgets/Input/SComboBox.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< FSlateAccessibleWidget > CreateAccessibleWidget() |
Widgets/Input/SComboBox.h | ||
virtual TOptional< FText > GetDefaultAccessibleText
(
EAccessibleType AccessibleType |
Widgets/Input/SComboBox.h |
Protected
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsInteractable() |
Widgets/Input/SComboBox.h | ||
| Handle key presses that SListView ignores | Widgets/Input/SComboBox.h | ||
virtual bool SupportsKeyboardFocus() |
Widgets/Input/SComboBox.h |