Navigation
API > API/Runtime > API/Runtime/Slate
A combo box that shows text content.
| Name | STextComboBox |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Input/STextComboBox.h |
| Include Path | #include "Widgets/Input/STextComboBox.h" |
Syntax
class STextComboBox : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → STextComboBox
- FSlateControlledConstruction → SWidget → SCompoundWidget → STextComboBox
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FGetTextComboLabel | TBaseDelegate_OneParam< FString, TSharedPtr< FString > > | Widgets/Input/STextComboBox.h | |
| FOnTextSelectionChanged | TSlateDelegates< TSharedPtr< FString > >::FOnSelectionChanged | Widgets/Input/STextComboBox.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Font | TAttribute< FSlateFontInfo > | Sets the font used to draw the text | Widgets/Input/STextComboBox.h | |
| GetTextLabelForItem | FGetTextComboLabel | Called to get the text label for an item | Widgets/Input/STextComboBox.h | |
| SelectedItem | TSharedPtr< FString > | The text item selected | Widgets/Input/STextComboBox.h | |
| SelectionChanged | FOnTextSelectionChanged | Forwarding Delegate | Widgets/Input/STextComboBox.h | |
| StringCombo | TSharedPtr< SComboBox< TSharedPtr< FString > > > | The combo box | Widgets/Input/STextComboBox.h | |
| Strings | TArray< TSharedPtr< FString > > | Array of shared pointers to strings so combo widget can work on them | Widgets/Input/STextComboBox.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearItemsSource() |
Clears current item source | Widgets/Input/STextComboBox.h | |
void ClearSelection() |
Clears the selected item in the text combo | Widgets/Input/STextComboBox.h | |
void Construct
(
const FArguments& InArgs |
Widgets/Input/STextComboBox.h | ||
TSharedPtr< FString > GetSelectedItem() |
Returns the currently selected text string | Widgets/Input/STextComboBox.h | |
bool IsOpen() |
Widgets/Input/STextComboBox.h | ||
TSharedRef< SWidget > MakeItemWidget
(
TSharedPtr< FString > StringItem |
Called to create a widget for each string | Widgets/Input/STextComboBox.h | |
void RefreshOptions() |
Request to reload the text options in the combobox from the OptionsSource attribute | Widgets/Input/STextComboBox.h | |
void SetItemsSource
(
const TArray< TSharedPtr< FString > >* InListItemsSource |
Sets new item source | Widgets/Input/STextComboBox.h | |
void SetItemsSource
(
TSharedRef<::UE::Slate::Containers::TObservableArray< TSharedPtr< FString > > > InListItemsSource |
Sets new item source | Widgets/Input/STextComboBox.h | |
void SetSelectedItem
(
TSharedPtr< FString > NewSelection |
Widgets/Input/STextComboBox.h | ||
void SetStyle
(
const FComboBoxStyle* InComboStyle |
Update the style of the internal ComboBox | Widgets/Input/STextComboBox.h |