UCheckBox

The checkbox widget allows you to display a toggled state of 'unchecked', 'checked' and 'indeterminable.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/CheckBox.h

Include

#include "Components/CheckBox.h"

Syntax

class UCheckBox : public UContentWidget

Remarks

The checkbox widget allows you to display a toggled state of 'unchecked', 'checked' and 'indeterminable. You can use the checkbox for a classic checkbox, or as a toggle button, or as radio buttons.

  • Single Child

  • Toggle

Variables

Name Description

Public variable

ECheckBoxState

 

CheckedState

Whether the check box is currently in a checked state

Public variable

FGetCheckBoxSta...

 

CheckedStateDelegate

A bindable delegate for the IsChecked.

Public variable

TEnumAsByte< EH...

 

HorizontalAlignment

How the content of the toggle button should align within the given space

Public variable

bool

 

IsFocusable

Sometimes a button should only be mouse-clickable and never keyboard focusable.

Protected variable

ECheckBoxState

 

K2_Cache_CheckedState

Protected variable

TSharedPtr< SCh...

 

MyCheckbox

Public variable

FOnCheckBoxComp...

 

OnCheckStateChanged

Called when the checked state has changed

Public variable

FCheckBoxStyle

 

WidgetStyle

The checkbox bar style

Constructors

Name Description

Public function

UCheckBox

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

ECheckBoxSta...

 

GetCheckedState()

Returns the full current checked state.

Public function Const

bool

 

IsChecked()

Returns true if the checkbox is currently checked

Public function Const

bool

 

IsPressed()

Returns true if this button is currently pressed

Protected function

ECheckBoxSta...

 

K2_Gate_CheckedState()

Public function

void

 

SetCheckedState

(
    ECheckBoxState InCheckedState
)

Sets the checked state.

Public function

void

 

SetIsChecked

(
    bool InIsChecked
)

Sets the checked state.

Protected function

void

 

SlateOnCheckStateChangedCallback

(
    ECheckBoxState NewState
)

Overridden from UPanelWidget

Name Description

Protected function Virtual

void

 

OnSlotAdded

(
    UPanelSlot* Slot
)

UPanelWidget.

Protected function Virtual

void

 

OnSlotRemoved

(
    UPanelSlot* Slot
)

Overridden from UWidget

Name Description

Protected function Virtual Const

TSharedPtr< ...

 

GetAccessibleWidget()

Gets the widget that accessibility properties should synchronize to.

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Protected function Virtual

TSharedRef< ...

 

RebuildDesignWidget

(
    TSharedRef< SWidget > Content
)

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

Begin UObject.

Deprecated Variables

Name Description

Public variable

FSlateColor

 

BorderBackgroundColor_DEPRECATED

The color of the background border

Public variable

USlateBrushAsse...

 

CheckedHoveredImage_DEPRECATED

Image to use when the checkbox is checked and hovered

Public variable

USlateBrushAsse...

 

CheckedImage_DEPRECATED

Image to use when the checkbox is checked

Public variable

USlateBrushAsse...

 

CheckedPressedImage_DEPRECATED

Image to use when the checkbox is checked and pressed

Public variable

FMargin

 

Padding_DEPRECATED

Spacing between the check box image and its content

Public variable

USlateWidgetSty...

 

Style_DEPRECATED

Style of the check box

Public variable

USlateBrushAsse...

 

UncheckedHoveredImage_DEPRECATED

Image to use when the checkbox is unchecked and hovered

Public variable

USlateBrushAsse...

 

UncheckedImage_DEPRECATED

Image to use when the checkbox is unchecked

Public variable

USlateBrushAsse...

 

UncheckedPressedImage_DEPRECATED

Image to use when the checkbox is unchecked and pressed

Public variable

USlateBrushAsse...

 

UndeterminedHoveredImage_DEPRECATED

Image to use when the checkbox is checked and hovered

Public variable

USlateBrushAsse...

 

UndeterminedImage_DEPRECATED

Image to use when the checkbox is in an ambiguous state and hovered

Public variable

USlateBrushAsse...

 

UndeterminedPressedImage_DEPRECATED

Image to use when the checkbox is in an ambiguous state and pressed

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