UPanelWidget

The base class for all UMG panel widgets. Panel widgets layout a collection of child widgets.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

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

Include

#include "Components/PanelWidget.h"

Syntax

class UPanelWidget : public UWidget

Remarks

The base class for all UMG panel widgets. Panel widgets layout a collection of child widgets.

Variables

Name Description

Protected variable

bool

 

bCanHaveMultipleChildren

Can this panel allow for multiple children?

Protected variable

TArray< UPanelS...

 

Slots

The slots in the widget holding the child widgets of this panel.

Constructors

Name Description

Public function

UPanelWidget

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

UPanelSlot &...

 

AddChild

(
    UWidget* Content
)

Adds a new child widget to the container.

Public function Const

bool

 

CanAddMoreChildren()

Returns true if the panel can accept another child widget.

Public function Const

bool

 

CanHaveMultipleChildren()

Returns true if the panel supports more than one child.

Public function Virtual

void

 

ClearChildren()

Remove all child widgets from the panel widget.

Public function Const

TArray< UWid...

 

GetAllChildren()

Gets all widgets in the container

Public function Const

UWidget *...

 

GetChildAt

(
    int32 Index
)

Gets the widget at an index.

Public function Const

int32

 

GetChildIndex

(
    const UWidget* Content
)

Gets the index of a specific child widget

Public function Const

int32

 

GetChildrenCount()

Gets number of child widgets in the container.

Protected function Virtual Const

UClass *

 

GetSlotClass()

Public function Const

const TArray...

 

GetSlots()

The slots in the widget holding the child widgets of this panel.

Public function Const

bool

 

HasAnyChildren()

Returns true if there are any child widgets in the panel

Public function Const

bool

 

HasChild

(
    UWidget* Content
)

Returns true if panel contains this widget

Public function

UPanelSlot &...

 

InsertChildAt

(
    int32 Index,
    UWidget* Content
)

Inserts a widget at a specific index.

Public function Virtual Const

bool

 

LockToPanelOnDrag()

Protected function Virtual

void

 

OnSlotAdded

(
    UPanelSlot* InSlot
)

Protected function Virtual

void

 

OnSlotRemoved

(
    UPanelSlot* InSlot
)

Public function

bool

 

RemoveChild

(
    UWidget* Content
)

Removes a specific widget from the container.

Public function

bool

 

RemoveChildAt

(
    int32 Index
)

Removes a child by it's index.

Public function Virtual

bool

 

ReplaceChild

(
    UWidget* CurrentChild,
    UWidget* NewChild
)

Swaps the child widget out of the slot, and replaces it with the new child widget.

Public function

bool

 

ReplaceChildAt

(
    int32 Index,
    UWidget* Content
)

Swaps the widget out of the slot at the given index, replacing it with a different widget.

Public function

void

 

ShiftChild

(
    int32 Index,
    UWidget* Child
)

Moves the child widget from its current index to the new index provided.

Overridden from UWidget

Name Description

Public function Virtual

void

 

ConnectEditorData()

Allows general fixups and connections only used at editor time.

Protected function Virtual

TSharedRef< ...

 

RebuildDesignWidget

(
    TSharedRef< SWidget > Content
)

Public function Virtual

void

 

SetDesignerFlags

(
    EWidgetDesignFlags NewFlags
)

Sets the designer flags on the widget.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

Begin UObject.

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