Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UVisual
- UWidget
- UPanelWidget
- UContentWidget
- UCheckBox
- UEditorUtilityCheckBox
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
| Type | Name | Description | |
|---|---|---|---|
| TEnumAsByte< EHorizontalAlignment > | HorizontalAlignment | How the content of the toggle button should align within the given space | |
| PRAGMA_DISABLE_DEPRECATION_WARNINGSECheckBoxState | K2_Cache_CheckedState | ||
| TSharedPtr< SCheckBox > | MyCheckbox | ||
| FOnCheckBoxComponentStateChanged | OnCheckStateChanged | Called when the checked state has changed |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UCheckBox
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| ECheckBoxState | Returns the full current checked state. | ||
| EButtonClickMethod::Type | Returns the click method. | ||
| bool | Is the checkbox focusable. | ||
| EButtonPressMethod::Type | Returns the press method. | ||
| EButtonTouchMethod::Type | Returns the touch method. | ||
| const FCheckBoxStyle & | Returns the local style. | ||
| void | InitCheckedStateDelegate
(
FGetCheckBoxState InCheckedStateDelegate |
||
| void | InitIsFocusable
(
bool InIsFocusable |
Initialize IsFocusable in the constructor before the SWidget is constructed. | |
| bool | IsChecked () |
Returns true if the checkbox is currently checked | |
| bool | IsPressed () |
Returns true if this button is currently pressed | |
| ECheckBoxState | |||
| void | SetCheckedState
(
ECheckBoxState InCheckedState |
Sets the checked state. | |
| void | SetClickMethod
(
EButtonClickMethod::Type InClickMethod |
Sets the click method. | |
| void | SetIsChecked
(
bool InIsChecked |
Sets the checked state. | |
| void | SetPressMethod
(
EButtonPressMethod::Type InPressMethod |
Sets the press method. | |
| void | SetTouchMethod
(
EButtonTouchMethod::Type InTouchMethod |
Sets the touch method. | |
| void | SetWidgetStyle
(
const FCheckBoxStyle& InStyle |
Sets the style. | |
| void | SlateOnCheckStateChangedCallback
(
ECheckBoxState NewState |
Overridden from UPanelWidget
| Type | Name | Description | |
|---|---|---|---|
| void | OnSlotAdded
(
UPanelSlot* Slot |
UPanelWidget. | |
| void | OnSlotRemoved
(
UPanelSlot* Slot |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< SWidget > | Gets the widget that accessibility properties should synchronize to. | ||
| const FText | Gets the palette category of the widget | ||
| TSharedRef< SWidget > | RebuildDesignWidget
(
TSharedRef< SWidget > Content |
||
| TSharedRef< SWidget > | Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | ||
| void | Applies all properties to the native widget if possible. |
Overridden from UVisual
| Type | Name | Description | |
|---|---|---|---|
| void | ReleaseSlateResources
(
bool bReleaseChildren |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| ECheckBoxState | CheckedState | Direct access to CheckedState is deprecated. Please use the getter or setter. | |
| FGetCheckBoxState | CheckedStateDelegate | Direct access to CheckedStateDelegate is deprecated. Please use the InitCheckedStateDelegate() function. | |
| TEnumAsByte< EButtonClickMethod::Type > | ClickMethod | Direct access to ClickMethod is deprecated. Please use the getter or setter. | |
| bool | IsFocusable | Direct access to bIsFocusable is deprecated. Please use the getter. Note that this property is only set at construction and is not modifiable at runtime. | |
| TEnumAsByte< EButtonPressMethod::Type > | PressMethod | Direct access to PressMethod is deprecated. Please use the getter or setter. | |
| TEnumAsByte< EButtonTouchMethod::Type > | TouchMethod | Direct access to TouchMethod is deprecated. Please use the getter or setter. | |
| FCheckBoxStyle | WidgetStyle | Direct access to WidgetStyle is deprecated. Please use the getter or setter. |