Navigation
API > API/Runtime > API/Runtime/UMG
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
| Name | UCheckBox |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/CheckBox.h |
| Include Path | #include "Components/CheckBox.h" |
Syntax
UCLASS (MinimalAPI)
class UCheckBox : public UContentWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UPanelWidget → UContentWidget → UCheckBox
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UCheckBox
(
const FObjectInitializer& ObjectInitializer |
Components/CheckBox.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CheckedState | ECheckBoxState | Whether the check box is currently in a checked state | Components/CheckBox.h |
|
| CheckedStateDelegate | FGetCheckBoxState | A bindable delegate for the IsChecked. | Components/CheckBox.h | |
| ClickMethod | TEnumAsByte< EButtonClickMethod::Type > | The type of mouse action required by the user to trigger the buttons 'Click' | Components/CheckBox.h |
|
| HorizontalAlignment | TEnumAsByte< EHorizontalAlignment > | How the content of the toggle button should align within the given space | Components/CheckBox.h |
|
| IsFocusable | bool | Sometimes a button should only be mouse-clickable and never keyboard focusable. | Components/CheckBox.h |
|
| OnCheckStateChanged | FOnCheckBoxComponentStateChanged | Called when the checked state has changed | Components/CheckBox.h |
|
| PressMethod | TEnumAsByte< EButtonPressMethod::Type > | The type of keyboard/gamepad button press action required by the user to trigger the buttons 'Click' | Components/CheckBox.h |
|
| TouchMethod | TEnumAsByte< EButtonTouchMethod::Type > | The type of touch action required by the user to trigger the buttons 'Click' | Components/CheckBox.h |
|
| WidgetStyle | FCheckBoxStyle | The checkbox bar style | Components/CheckBox.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ECheckBoxState GetCheckedState() |
Returns the full current checked state. | Components/CheckBox.h |
|
EButtonClickMethod::Type GetClickMethod() |
Returns the click method. | Components/CheckBox.h | |
bool GetIsFocusable() |
Is the checkbox focusable. | Components/CheckBox.h | |
EButtonPressMethod::Type GetPressMethod() |
Returns the press method. | Components/CheckBox.h | |
EButtonTouchMethod::Type GetTouchMethod() |
Returns the touch method. | Components/CheckBox.h | |
const FCheckBoxStyle & GetWidgetStyle() |
Returns the local style. | Components/CheckBox.h | |
bool IsChecked() |
Returns true if the checkbox is currently checked | Components/CheckBox.h |
|
bool IsPressed() |
Returns true if this button is currently pressed | Components/CheckBox.h |
|
void SetCheckedState
(
ECheckBoxState InCheckedState |
Sets the checked state. | Components/CheckBox.h |
|
void SetClickMethod
(
EButtonClickMethod::Type InClickMethod |
Sets the click method. | Components/CheckBox.h |
|
void SetIsChecked
(
bool InIsChecked |
Sets the checked state. | Components/CheckBox.h |
|
void SetPressMethod
(
EButtonPressMethod::Type InPressMethod |
Sets the press method. | Components/CheckBox.h |
|
void SetTouchMethod
(
EButtonTouchMethod::Type InTouchMethod |
Sets the touch method. | Components/CheckBox.h |
|
void SetWidgetStyle
(
const FCheckBoxStyle& InStyle |
Sets the style. | Components/CheckBox.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/CheckBox.h | |
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/CheckBox.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/CheckBox.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void InitCheckedStateDelegate
(
FGetCheckBoxState InCheckedStateDelegate |
Components/CheckBox.h | ||
void InitIsFocusable
(
bool InIsFocusable |
Initialize IsFocusable in the constructor before the SWidget is constructed. | Components/CheckBox.h | |
ECheckBoxState K2_Gate_CheckedState() |
Components/CheckBox.h | ||
void SlateOnCheckStateChangedCallback
(
ECheckBoxState NewState |
Components/CheckBox.h |
Overridden from UPanelWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnSlotAdded
(
UPanelSlot* Slot |
UPanelWidget. | Components/CheckBox.h | |
virtual void OnSlotRemoved
(
UPanelSlot* Slot |
Components/CheckBox.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< SWidget > GetAccessibleWidget() |
Gets the widget that accessibility properties should synchronize to. | Components/CheckBox.h | |
virtual TSharedRef< SWidget > RebuildDesignWidget
(
TSharedRef< SWidget > Content |
Components/CheckBox.h | ||
virtual TSharedRef< SWidget > RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | Components/CheckBox.h |