SSuggestionTextBox

Implements an editable text box that can show auto-complete histories and suggestions lists.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

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

Include

#include "Widgets/Input/SSuggestionTextBox.h"

Syntax

class SSuggestionTextBox : public SCompoundWidget

Remarks

Implements an editable text box that can show auto-complete histories and suggestions lists.

Constructors

Name Description

Public function

SSuggestionTextBox()

Default constructor.

Functions

Name Description

Protected function

void

 

ClearSuggestions()

Clears the list of suggestions and hides the suggestions list.

Public function

void

 

Construct

(
    const FArguments & InArgs
)

Construct this widget. Called by the SNew()Slate macro.

Protected function

void

 

FocusTextBox()

Sets the keyboard focus to the text box.

Protected function Const

FString

 

GetSelectedSuggestionString()

Gets the string value of the currently selected suggestion.

Public function Const

FText

 

GetText()

Returns the text string.

Protected function

void

 

MarkActiveSuggestion()

Highlights the selected suggestion in the suggestion list.

Public function

void

 

SetError

(
    const FString & InError
)

Sets an optional error string.

Protected function

void

 

SetSuggestions

(
    TArray < FString >& SuggestionStrin...,
    bool InHistoryMode
)

Sets the list of suggestions.

Public function

void

 

SetText

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

Sets the text string currently being edited

Overridden from SWidget

Name Description

Protected function Virtual

void

 

OnFocusLost

(
    const FFocusEvent & InFocusEvent
)

Called when this widget loses focus. This event does not bubble.

Protected 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)

Protected 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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback