Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Input
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SCompoundWidget
- SBorder
- SEditableTextBox
- SSearchBox
References
| Module | Slate |
| Header | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SEditableTextBox.h |
| Include | #include "Widgets/Input/SEditableTextBox.h" |
Syntax
class SEditableTextBox : public SBorder
Remarks
Editable text box widget
Variables
| Type | Name | Description | |
|---|---|---|---|
| TAttribute< FSlateColor > | BackgroundColorOverride | Background color (overrides style) | |
| TSharedPtr< SHorizontalBox > | Box | Allows for inserting additional widgets that extend the functionality of the text box | |
| TSharedPtr< SEditableText > | EditableText | Editable text widget | |
| TSharedPtr< class IErrorReportingWidget > | ErrorReporting | SomeWidget reporting | |
| TAttribute< FSlateColor > | FocusedForegroundColorOverride | Focused foreground color (overrides style) | |
| TAttribute< FSlateFontInfo > | FontOverride | Font (overrides style) | |
| TAttribute< FSlateColor > | ForegroundColorOverride | Foreground color (overrides style) | |
| FOnTextChanged | OnTextChanged | Called when the text is changed interactively | |
| FOnTextCommitted | OnTextCommitted | Called when the user commits their change to the editable text control | |
| FOnVerifyTextChanged | OnVerifyTextChanged | Callback to verify text when changed. Will return an error message to denote problems. | |
| TSharedPtr< SBox > | PaddingBox | Box widget that adds padding around the editable text | |
| TAttribute< FMargin > | PaddingOverride | Padding (overrides style) | |
| TAttribute< FSlateColor > | ReadOnlyForegroundColorOverride | Read-only foreground color (overrides style) | |
| const FEditableTextBoxStyle * | Style |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AdvanceSearch
(
const bool InReverse |
Advance the current search to the next match (does nothing if not currently searching) | |
| bool | Query to see if any text is selected within the document | ||
| void | BeginSearch
(
const FText& InSearchText, |
Begin a new text search (this is called automatically when the bound search text changes) | |
| void | Clear the active text selection | ||
| void | Construct
(
const FArguments& InArgs |
Construct this widget | |
| void | Register and activate the IME context for the text layout of this textbox | ||
| FText | GetHintText () |
Returns the Hint text string | |
| FText | Get the text that is currently being searched for (if any) | ||
| FText | Get the currently selected text | ||
| FText | GetText () |
Returns the text string | |
| void | GoTo
(
const ETextLocation NewLocation |
Move the cursor to the specified location | |
| void | GoTo
(
const FTextLocation& NewLocation |
Move the cursor to the given location in the document | |
| bool | HasError () |
||
| bool | IsPassword () |
||
| bool | IsReadOnly () |
||
| void | OnEditableTextChanged
(
const FText& InText |
Callback for the editable text's OnTextChanged event | |
| void | OnEditableTextCommitted
(
const FText& InText, |
Callback when the editable text is committed. | |
| void | ScrollTo
(
const ETextLocation NewLocation |
Scroll to the given location in the document (without moving the cursor) | |
| void | ScrollTo
(
const FTextLocation& NewLocation |
Scroll to the given location in the document (without moving the cursor) | |
| void | Select all the text in the document | ||
| void | SetAllowContextMenu
(
TAttribute< bool > InAllowContextMenu |
See the AllowContextMenu attribute | |
| void | SetClearKeyboardFocusOnCommit
(
const TAttribute< bool >& InClearKeyboardFocusOnCommit |
Sets whether to clear keyboard focus when pressing enter to commit changes | |
| void | If InError is a non-empty string the TextBox will the ErrorReporting provided during construction If no error reporting was provided, the TextBox will create a default error reporter. | ||
| void | If InError is a non-empty string the TextBox will the ErrorReporting provided during construction If no error reporting was provided, the TextBox will create a default error reporter. | ||
| void | SetFocusedForegroundColor
(
const TAttribute< FSlateColor >& InFocusedForegroundColor |
Sets the text color and opacity when this box has keyboard focus(overrides Style) | |
| void | SetFont
(
const TAttribute< FSlateFontInfo >& InFont |
Sets the font used to draw the text | |
| void | SetHintText
(
const TAttribute< FText >& InHintText |
See the HintText attribute | |
| void | SetIsCaretMovedWhenGainFocus
(
const TAttribute< bool >& InIsCaretMovedWhenGainFocus |
Workaround as we loose focus when the auto completion closes. | |
| void | SetIsPassword
(
TAttribute< bool > InIsPassword |
See the IsPassword attribute | |
| void | SetIsReadOnly
(
TAttribute< bool > InIsReadOnly |
See the IsReadOnly attribute | |
| void | SetJustification
(
const TAttribute< ETextJustify::Type >& InJustification |
See Justification attribute | |
| void | SetMinimumDesiredWidth
(
const TAttribute< float >& InMinimumDesiredWidth |
Sets the minimum width that a text box should be. | |
| void | SetOnKeyCharHandler
(
FOnKeyChar InOnKeyCharHandler |
Sets the OnKeyCharHandler to provide first chance handling of the SEditableText's OnKeyChar event | |
| void | SetOnKeyDownHandler
(
FOnKeyDown InOnKeyDownHandler |
Sets the OnKeyDownHandler to provide first chance handling of the SEditableText's OnKeyDown event | |
| void | SetOverflowPolicy
(
TOptional< ETextOverflowPolicy > InOverflowPolicy |
Sets the overflow policy for this text block | |
| void | SetReadOnlyForegroundColor
(
const TAttribute< FSlateColor >& InReadOnlyForegroundColor |
Sets the text color and opacity when read-only (overrides Style) | |
| void | SetRevertTextOnEscape
(
const TAttribute< bool >& InRevertTextOnEscape |
Sets whether to allow the user to back out of changes when they press the escape key | |
| void | SetSearchText
(
const TAttribute< FText >& InSearchText |
Set the text that is currently being searched for (if any) | |
| void | SetSelectAllTextOnCommit
(
const TAttribute< bool >& InSelectAllTextOnCommit |
Sets whether to select all text when pressing enter to commit changes | |
| void | SetSelectAllTextWhenFocused
(
const TAttribute< bool >& InSelectAllTextWhenFocused |
Sets whether to select all text when the user clicks to give focus on the widget | |
| void | SetSelectWordOnMouseDoubleClick
(
const TAttribute< bool >& InSelectWordOnMouseDoubleClick |
Sets whether to select select word on mouse double click | |
| void | SetStyle
(
const FEditableTextBoxStyle* InStyle |
See attribute Style | |
| void | SetText
(
const TAttribute< FText >& InNewText |
Sets the text string currently being edited | |
| void | SetTextBlockStyle
(
const FTextBlockStyle* InTextStyle |
Sets the text block style currently used | |
| void | SetTextBoxBackgroundColor
(
const TAttribute< FSlateColor >& InBackgroundColor |
Sets the color of the background/border around the editable text (overrides Style) | |
| void | SetTextBoxForegroundColor
(
const TAttribute< FSlateColor >& InForegroundColor |
Sets the text color and opacity (overrides Style) | |
| void | SetTextFlowDirection
(
const TOptional< ETextFlowDirection >& InTextFlowDirection |
See TextFlowDirection attribute | |
| void | SetTextShapingMethod
(
const TOptional< ETextShapingMethod >& InTextShapingMethod |
See TextShapingMethod attribute | |
| void | SetVirtualKeyboardDismissAction
(
TAttribute< EVirtualKeyboardDismissAction > InVirtualKeyboardDismissAction |
Set the VirtualKeyboardDismissAction attribute |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< FSlateAccessibleWidget > | |||
| TOptional< FText > | GetDefaultAccessibleText
(
EAccessibleType AccessibleType |
Assign AccessibleText with a default value that can be used when AccessibleBehavior is set to Auto or Custom. | |
| bool | Checks to see if this widget currently has the keyboard focus | ||
| FReply | OnFocusReceived
(
const FGeometry& MyGeometry, |
KEY INPUT Called when focus is given to this widget. This event does not bubble. | |
| FReply | Called after a key is pressed when this widget has focus (this event bubbles if not handled) | ||
| bool | Checks to see if this widget supports keyboard focus. Override this in derived classes. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments |