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

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

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

Protected variable

FDelegateHandle

 

TickHandle

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...
)

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

 

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.

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback