RealDocs

UBorder::SetContentColorAndOpacity

function UMG Blueprint Since 4.0
#include "Components/Border.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Sets the color and opacity multiplier applied to the border's child content, without affecting the border's own background brush.

Caveats & Gotchas

  • Only tints the child content, not the border's background brush — use SetBrushColor to change the brush's tint instead.
  • The direct ContentColorAndOpacity UPROPERTY is deprecated as of 5.1; this setter is now the supported way to change it at runtime.

Signature

UMG_API void SetContentColorAndOpacity(FLinearColor InContentColorAndOpacity)

Parameters

Name Type Description Default
InContentColorAndOpacity FLinearColor New color and opacity multiplier applied to the border's content.

Return Type

void

Example

Fade border content C++
void UMyUserWidget::FadeBorderContent(float Alpha)
{
    if (MyBorder)
    {
        MyBorder->SetContentColorAndOpacity(FLinearColor(1.f, 1.f, 1.f, Alpha));
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.