UScrollBox

An arbitrary scrollable collection of widgets.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

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

Include

#include "Components/ScrollBox.h"

Syntax

class UScrollBox : public UPanelWidget

Remarks

An arbitrary scrollable collection of widgets. Great for presenting 10-100 widgets in a list. Doesn't support virtualization.

Variables

Name Description

Public variable

bool

 

AllowOverscroll

Disable to stop scrollbars from activating inertial overscrolling

Public variable

bool

 

AlwaysShowScrollbar

Public variable

bool

 

AlwaysShowScrollbarTrack

Public variable

bool

 

bAllowRightClickDragScrolling

Option to disable right-click-drag scrolling

Public variable

bool

 

bAnimateWheelScrolling

True to lerp smoothly when wheel scrolling along the scroll box

Public variable

EConsumeMouseWh...

 

ConsumeMouseWheel

When mouse wheel events should be consumed.

Protected variable

float

 

DesiredScrollOffset

The desired scroll offset for the underlying scrollbox.

Protected variable

TSharedPtr< cla...

 

MyScrollBox

Public variable

EDescendantScro...

 

NavigationDestination

Sets where to scroll a widget to when using explicit navigation or if ScrollWhenFocusChanges is enabled

Public variable

float

 

NavigationScrollPadding

The amount of padding to ensure exists between the item being navigated to, at the edge of the scrollbox.

Public variable

FOnUserScrolled...

 

OnUserScrolled

Called when the scroll has changed

Public variable

TEnumAsByte< EO...

 

Orientation

The orientation of the scrolling and stacking in the box.

Public variable

FMargin

 

ScrollbarPadding

The margin around the scrollbar

Public variable

FVector2D

 

ScrollbarThickness

The thickness of the scrollbar thumb

Public variable

ESlateVisibilit...

 

ScrollBarVisibility

Visibility

Public variable

EScrollWhenFocu...

 

ScrollWhenFocusChanges

Scroll behavior when user focus is given to a child widget

Protected variable

FDelegateHandle

 

TickHandle

Public variable

float

 

WheelScrollMultiplier

The multiplier to apply when wheel scrolling

Public variable

FScrollBarStyle

 

WidgetBarStyle

The bar style

Public variable

FScrollBoxStyle

 

WidgetStyle

The style

Constructors

Name Description

Public function

UScrollBox

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

EndInertialScrolling()

Instantly stops any inertial scrolling that is currently in progress

Public function Const

float

 

GetScrollOffset()

Gets the scroll offset of the scrollbox in Slate Units.

Public function Const

float

 

GetScrollOffsetOfEnd()

Gets the scroll offset of the bottom of the ScrollBox in Slate Units.

Public function Const

float

 

GetViewOffsetFraction()

Public function

void

 

ScrollToEnd()

Scrolls the ScrollBox to the bottom instantly during the next layout pass.

Public function

void

 

ScrollToStart()

Scrolls the ScrollBox to the top instantly

Public function

void

 

ScrollWidgetIntoView

(
    UWidget* WidgetToFind,
    bool AnimateScroll,
    EDescendantScrollDestination Scroll...,
    float Padding
)

Scrolls the ScrollBox to the widget during the next layout pass.

Public function

void

 

SetAllowOverscroll

(
    bool NewAllowOverscroll
)

Public function

void

 

SetAlwaysShowScrollbar

(
    bool NewAlwaysShowScrollbar
)

Public function

void

 

SetAnimateWheelScrolling

(
    bool bShouldAnimateWheelScrolling
)

Public function

void

 

SetConsumeMouseWheel

(
    EConsumeMouseWheel NewConsumeMouseW...
)

Public function

void

 

SetOrientation

(
    EOrientation NewOrientation
)

Public function

void

 

SetScrollbarPadding

(
    const FMargin& NewScrollbarPadding
)

Public function

void

 

SetScrollbarThickness

(
    const FVector2D& NewScrollbarThick...
)

Public function

void

 

SetScrollBarVisibility

(
    ESlateVisibility NewScrollBarVisibi...
)

Public function

void

 

SetScrollOffset

(
    float NewScrollOffset
)

Updates the scroll offset of the scrollbox.

Public function

void

 

SetScrollWhenFocusChanges

(
    EScrollWhenFocusChanges NewScrollWh...
)

Public function

void

 

SetWheelScrollMultiplier

(
    float NewWheelScrollMultiplier
)

Protected function

void

 

SlateHandleUserScrolled

(
    float CurrentOffset
)

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

 

OnDescendantDeselectedByDesigner

(
    UWidget* DescendantWidget
)

Public function Virtual

void

 

OnDescendantSelectedByDesigner

(
    UWidget* DescendantWidget
)

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

void

 

PostLoad()

Begin UObject.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Deprecated Variables

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