SComboButton

A button that, when clicked, brings up a popup.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Slate

Header

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

Include

#include "Widgets/Input/SComboButton.h"

Syntax

class SComboButton : public SMenuAnchor

Remarks

A button that, when clicked, brings up a popup.

Variables

Name Description

Protected variable

bool

 

bIsFocusable

Can this button be focused?

Protected variable

SHorizontalBox:...

 

ButtonContentSlot

Area where the button's content resides

Protected variable

TWeakPtr< SWidg...

 

ContentWidgetPtr

The content widget, if any, set by the user on creation

Protected variable

const FSlateBru...

 

MenuBorderBrush

Brush to use to add a "menu border" around the drop-down content

Protected variable

FMargin

 

MenuBorderPadding

Padding to use to add a "menu border" around the drop-down content

Protected variable

FOnComboBoxOpen...

 

OnComboBoxOpened

Delegate to execute when the combo list is opened

Protected variable

TWeakPtr< SWidg...

 

WidgetToFocusPtr

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct the widget from a declaration

Protected function Const

FText

 

GetFilteredToolTipText

(
    TAttribute< FText > ToolTipText
)

Called to query the tool tip text for this widget, but will return an empty text when the menu is already open

Protected function Virtual

FReply

 

OnButtonClicked()

Handle the button being clicked by summoning the ComboButton.

Public function

void

 

SetMenuContentWidgetToFocus

(
    TWeakPtr< SWidget > InWidgetToFocus...
)

Public function

void

 

SetOnGetMenuContent

(
    FOnGetContent InOnGetMenuContent
)

See the OnGetMenuContent event

Overridden from SMenuAnchor

Name Description

Public function Virtual

void

 

SetMenuContent

(
    TSharedRef< SWidget > InMenuContent
)

See MenuContent attribute

Overridden from SWidget

Name Description

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)

Classes

Name

Description

Public struct

FArguments