SMultiLineEditableTextBox

Editable text box widget

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Input/SMultiLineEditableTextBox.h

Include

#include "Widgets/Input/SMultiLineEditableTextBox.h"

Syntax

class SMultiLineEditableTextBox : public SBorder

Remarks

Editable text box widget

Variables

Name Description

Protected variable

TAttribute< boo...

 

AllowContextMenu

Whether to disable the context menu

Protected variable

TAttribute< FSl...

 

BackgroundColorOverride

Background color (overrides style)

Protected variable

bool

 

bHasExternalHScrollBar

Whether we have an externally supplied horizontal scrollbar or one created internally

Protected variable

bool

 

bHasExternalVScrollBar

Whether we have an externally supplied vertical scrollbar or one created internally

Protected variable

TSharedPtr< SHo...

 

Box

Allows for inserting additional widgets that extend the functionality of the text box

Protected variable

TAttribute< boo...

 

bSelectWordOnMouseDoubleClick

Whether to select work on mouse double click

Protected variable

TSharedPtr< SMu...

 

EditableText

Editable text widget

Protected variable

TSharedPtr< cla...

 

ErrorReporting

SomeWidget reporting

Protected variable

TAttribute< FSl...

 

FontOverride

Font (overrides style)

Protected variable

TAttribute< FSl...

 

ForegroundColorOverride

Foreground color (overrides style)

Protected variable

TSharedPtr< SSc...

 

HScrollBar

Horiz scrollbar

Protected variable

TSharedPtr< SBo...

 

HScrollBarPaddingBox

Box around the horiz scrollbar used for adding padding

Protected variable

TAttribute< FMa...

 

HScrollBarPaddingOverride

Horiz scrollbar padding (overrides style)

Protected variable

TAttribute< FMa...

 

PaddingOverride

Padding (overrides style)

Protected variable

TAttribute< FSl...

 

ReadOnlyForegroundColorOverride

Read-only foreground color (overrides style)

Protected variable

const FEditable...

 

Style

Protected variable

TSharedPtr< SSc...

 

VScrollBar

Vert scrollbar

Protected variable

TSharedPtr< SBo...

 

VScrollBarPaddingBox

Box around the vert scrollbar used for adding padding

Protected variable

TAttribute< FMa...

 

VScrollBarPaddingOverride

Vert scrollbar padding (overrides style)

Functions

Name Description

Public function

void

 

AdvanceSearch

(
    const bool InReverse
)

Advance the current search to the next match (does nothing if not currently searching)

Public function Const

bool

 

AnyTextSelected()

Query to see if any text is selected within the document

Public function

void

 

ApplyToSelection

(
    const FRunInfo& InRunInfo,
    const FTextBlockStyle& InStyle
)

Apply the given style to the currently selected text (or insert a new run at the current cursor position if no text is selected)

Public function

void

 

BeginSearch

(
    const FText& InSearchText,
    const ESearchCase::Type InSearchCas...,
    const bool InReverse
)

Begin a new text search (this is called automatically when the bound search text changes)

Public function

void

 

ClearSelection()

Clear the active text selection

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct this widget

Public function

void

 

ForceScroll

(
    int32 UserIndex,
    float ScrollAxisMagnitude
)

Public function Const

void

 

GetCurrentTextLine

(
    FString& OutTextLine
)

Return the text line where the current cursor location is at.

Public function Const

FText

 

GetHintText()

Returns the hint text string

Public function Const

TSharedPtr< ...

 

GetHScrollBar()

Get the horizontal scroll bar widget

Public function Const

FText

 

GetPlainText()

Returns the plain text string without richtext formatting

Public function Const

TSharedPtr< ...

 

GetRunUnderCursor()

Get the run currently under the cursor, or null if there is no run currently under the cursor

Public function Const

FText

 

GetSearchText()

Get the text that is currently being searched for (if any)

Public function Const

TArray< TSha...

 

GetSelectedRuns()

Get the runs currently that are current selected, some of which may be only partially selected

Public function Const

FText

 

GetSelectedText()

Get the currently selected text

Public function Const

FText

 

GetText()

Returns the text string

Public function Const

TSharedPtr< ...

 

GetVScrollBar()

Get the vertical scroll bar widget

Public function

void

 

GoTo

(
    const ETextLocation NewLocation
)

Move the cursor to the specified location

Public function

void

 

GoTo

(
    const FTextLocation& NewLocation
)

Move the cursor to the given location in the document

Public function

void

 

InsertRunAtCursor

(
    TSharedRef< IRun > InRun
)

Insert the given run at the current cursor position

Public function

void

 

InsertTextAtCursor

(
    const FString& InString
)

Insert the given text at the current cursor position, correctly taking into account new line characters

Public function

void

 

InsertTextAtCursor

(
    const FText& InText
)

Insert the given text at the current cursor position, correctly taking into account new line characters

Public function

void

 

Refresh()

Refresh this text box immediately, rather than wait for the usual caching mechanisms to take affect on the text Tick

Public function

void

 

ScrollTo

(
    const ETextLocation NewLocation
)

Scroll to the given location in the document (without moving the cursor)

Public function

void

 

ScrollTo

(
    const FTextLocation& NewLocation
)

Scroll to the given location in the document (without moving the cursor)

Public function

void

 

SelectAllText()

Select all the text in the document

Public function

void

 

SetAllowContextMenu

(
    const TAttribute< bool >& InAllowC...
)

See the AllowContextMenu attribute

Public function

void

 

SetAutoWrapText

(
    const TAttribute< bool >& InAutoWr...
)

See AutoWrapText attribute

Public function

void

 

SetError

(
    const FString& InError
)

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.

Public function

void

 

SetError

(
    const FText& InError
)

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.

Public function

void

 

SetHintText

(
    const TAttribute< FText >& InHintT...
)

Sets the text that appears when there is no text in the text box

Public function

void

 

SetIsReadOnly

(
    const TAttribute< bool >& InIsRead...
)

Set the ReadOnly attribute

Public function

void

 

SetJustification

(
    const TAttribute< ETextJustify::Typ...
)

See Justification attribute

Public function

void

 

SetLineHeightPercentage

(
    const TAttribute< float >& InLineH...
)

See LineHeightPercentage attribute

Public function

void

 

SetMargin

(
    const TAttribute< FMargin >& InMar...
)

See Margin attribute

Public function

void

 

SetOnKeyCharHandler

(
    FOnKeyChar InOnKeyCharHandler
)

Sets the OnKeyCharHandler to provide first chance handling of the SMultiLineEditableText's OnKeyChar event

Public function

void

 

SetOnKeyDownHandler

(
    FOnKeyDown InOnKeyDownHandler
)

Sets the OnKeyDownHandler to provide first chance handling of the SMultiLineEditableText's OnKeyDown event

Public function

void

 

SetReadOnlyForegroundColor

(
    const TAttribute< FSlateColor >& I...
)

Sets the text color and opacity when read-only (overrides Style)

Public function

void

 

SetSearchText

(
    const TAttribute< FText >& InSearc...
)

Set the text that is currently being searched for (if any)

Public function

void

 

SetSelectWordOnMouseDoubleClick

(
    const TAttribute< bool >& InSelect...
)

Sets whether to select word on the mouse double click

Public function

void

 

SetStyle

(
    const FEditableTextBoxStyle* I...
)

See attribute Style

Public function

void

 

SetText

(
    const TAttribute< FText >& InNewTe...
)

Sets the text string currently being edited

Public function

void

 

SetTextBoxBackgroundColor

(
    const TAttribute< FSlateColor >& I...
)

Sets the color of the background/border around the editable text (overrides Style)

Public function

void

 

SetTextBoxForegroundColor

(
    const TAttribute< FSlateColor >& I...
)

Sets the text color and opacity (overrides Style)

Public function

void

 

SetTextFlowDirection

(
    const TOptional< ETextFlowDirection...
)

See TextFlowDirection attribute

Public function

void

 

SetTextShapingMethod

(
    const TOptional< ETextShapingMethod...
)

See TextShapingMethod attribute

Public function

void

 

SetTextStyle

(
    const FTextBlockStyle* InTextS...
)

See attribute TextStyle

Public function

void

 

SetVirtualKeyboardDismissAction

Set the VirtualKeyboardDismissAction attribute

Public function

void

 

SetWrappingPolicy

(
    const TAttribute< ETextWrappingPoli...
)

Set WrappingPolicy attribute

Public function

void

 

SetWrapTextAt

(
    const TAttribute< float >& InWrapT...
)

See WrapTextAt attribute

Overridden from SWidget

Name Description

Public function Virtual Const

bool

 

HasKeyboardFocus()

Checks to see if this widget currently has the keyboard focus

Public function Virtual

FReply

 

OnFocusReceived

(
    const FGeometry& MyGeometry,
    const FFocusEvent& InFocusEvent
)

KEY INPUT Called when focus is given to this widget. This event does not bubble.

Public function Virtual

FReply

 

OnKeyDown

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Called after a key is pressed when this widget has focus (this event bubbles if not handled)

Public function Virtual Const

bool

 

SupportsKeyboardFocus()

Checks to see if this widget supports keyboard focus. Override this in derived classes.

Classes

Name

Description

Public struct

FArguments

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss