UScaleBox

Allows you to place content with a desired size and have it scale to meet the constraints placed on this box's alloted area.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

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

Include

#include "Components/ScaleBox.h"

Syntax

class UScaleBox : public UContentWidget

Remarks

Allows you to place content with a desired size and have it scale to meet the constraints placed on this box's alloted area. If you needed to have a background image scale to fill an area but not become distorted with different aspect ratios, or if you need to auto fit some text to an area, this is the control for you.

  • Single Child

  • Aspect Ratio

Variables

Name Description

Protected variable

TOptional< FVec...

 

DesignerSize

Public variable

bool

 

IgnoreInheritedScale

Optional bool to ignore the inherited scale.

Protected variable

TSharedPtr< SSc...

 

MyScaleBox

Public variable

TEnumAsByte< ES...

 

Stretch

The stretching rule to apply when content is stretched

Public variable

TEnumAsByte< ES...

 

StretchDirection

Controls in what direction content can be scaled

Public variable

float

 

UserSpecifiedScale

Optional scale that can be specified by the User. Used only for UserSpecified stretching.

Constructors

Name Description

Public function

UScaleBox

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

SetIgnoreInheritedScale

(
    bool bInIgnoreInheritedScale
)

Public function

void

 

SetStretch

(
    EStretch::Type InStretch
)

Public function

void

 

SetStretchDirection

(
    EStretchDirection::Type InStretchDi...
)

Public function

void

 

SetUserSpecifiedScale

(
    float InUserSpecifiedScale
)

Overridden from UPanelWidget

Name Description

Protected function Virtual Const

UClass *

 

GetSlotClass()

UPanelWidget.

Protected function Virtual

void

 

OnSlotAdded

(
    UPanelSlot* Slot
)

Protected function Virtual

void

 

OnSlotRemoved

(
    UPanelSlot* Slot
)

Overridden from UWidget

Name Description

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Public function Virtual

void

 

OnDesignerChanged

(
    const FDesignerChangedEventArgs& E...
)

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Public function Virtual Const

bool

 

CanEditChange

(
    const FProperty* InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

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