UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SComboButton Class Reference

#include <SComboButton.h>

+ Inheritance diagram for SComboButton:

Public Member Functions

 SLATE_BEGIN_ARGS (SComboButton)
 
virtual SLATE_API void SetMenuContent (TSharedRef< SWidget > InContent) override
 
SLATE_API void SetOnGetMenuContent (FOnGetContent InOnGetMenuContent)
 
SLATE_API void Construct (const FArguments &InArgs)
 
void SetMenuContentWidgetToFocus (TWeakPtr< SWidget > InWidgetToFocusPtr)
 
SLATE_API void SetButtonContentPadding (FMargin InPadding)
 
SLATE_API void SetHasDownArrow (bool InHasArrowDown)
 

Protected Member Functions

virtual SLATE_API FReply OnButtonClicked ()
 
virtual SLATE_API FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 
SLATE_API FText GetFilteredToolTipText (TAttribute< FText > ToolTipText) const
 

Protected Attributes

SHorizontalBox::FSlotButtonContentSlot
 
FOnComboBoxOpened OnComboBoxOpened
 
TWeakPtr< SWidgetWidgetToFocusPtr
 
const FSlateBrushMenuBorderBrush
 
FMargin MenuBorderPadding
 
TWeakPtr< SWidgetContentWidgetPtr
 
bool bIsFocusable
 

Detailed Description

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

Member Function Documentation

◆ Construct()

void SComboButton::Construct ( const FArguments &  InArgs)

Construct the widget from a declaration

Parameters
InArgsThe declaration from which to construct

◆ GetFilteredToolTipText()

FText SComboButton::GetFilteredToolTipText ( TAttribute< FText ToolTipText) const
protected

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

Parameters
ToolTipTextTool tip text to display, if possible
Returns
Tool tip text, or an empty text if filtered out

◆ OnButtonClicked()

FReply SComboButton::OnButtonClicked ( )
protectedvirtual

Handle the button being clicked by summoning the ComboButton.

◆ OnKeyDown()

FReply SComboButton::OnKeyDown ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
overrideprotectedvirtual

◆ SetButtonContentPadding()

void SComboButton::SetButtonContentPadding ( FMargin  InPadding)

See the padding for button content.

◆ SetHasDownArrow()

void SComboButton::SetHasDownArrow ( bool  InHasArrowDown)

add/remove the expanding arrow.

◆ SetMenuContent()

void SComboButton::SetMenuContent ( TSharedRef< SWidget InContent)
overridevirtual

The visual style of the button (overrides ComboButtonStyle) Optional static menu content. If the menu content needs to be dynamically built, use the OnGetMenuContent event Sets an event handler to generate a widget dynamically when the menu is needed. Spawn a new window or reuse current window for this combo True if this combo's menu should be collapsed when our parent receives focus, false (default) otherwise

◆ SetMenuContentWidgetToFocus()

void SComboButton::SetMenuContentWidgetToFocus ( TWeakPtr< SWidget InWidgetToFocusPtr)
inline

◆ SetOnGetMenuContent()

void SComboButton::SetOnGetMenuContent ( FOnGetContent  InOnGetMenuContent)

See the OnGetMenuContent event

◆ SLATE_BEGIN_ARGS()

SComboButton::SLATE_BEGIN_ARGS ( SComboButton  )
inline

Member Data Documentation

◆ bIsFocusable

bool SComboButton::bIsFocusable
protected

Can this button be focused?

◆ ButtonContentSlot

SHorizontalBox::FSlot* SComboButton::ButtonContentSlot
protected

Area where the button's content resides

◆ ContentWidgetPtr

TWeakPtr<SWidget> SComboButton::ContentWidgetPtr
protected

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

◆ MenuBorderBrush

const FSlateBrush* SComboButton::MenuBorderBrush
protected

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

◆ MenuBorderPadding

FMargin SComboButton::MenuBorderPadding
protected

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

◆ OnComboBoxOpened

FOnComboBoxOpened SComboButton::OnComboBoxOpened
protected

Delegate to execute when the combo list is opened

◆ WidgetToFocusPtr

TWeakPtr<SWidget> SComboButton::WidgetToFocusPtr
protected

The documentation for this class was generated from the following files: