UPanelWidget::ReplaceChild

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

Windows
MacOS
Linux

References

Module

UMG

Header

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

Include

#include "Components/PanelWidget.h"

Source

/Engine/Source/Runtime/UMG/Private/Components/PanelWidget.cpp

Syntax

virtual bool ReplaceChild
(
    UWidget * CurrentChild,
    UWidget * NewChild
)

Remarks

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

Returns

true if the CurrentChild was found and the swap occurred, otherwise false.

Parameters

Parameter

Description

CurrentChild

The existing child widget being removed.

NewChild

The new child widget being inserted.

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