Reference API Roblox

Engine API

Website

Related

Reference API Roblox

ScrollingFrame

ScrollingFrame is a special Frame type with built-in scrolling interactivity and different ways to customize how the scrolling works.

Member index 25

HistoryMember
553AbsoluteCanvasSize: Vector2
553AbsoluteWindowSize: Vector2
553AutomaticCanvasSize: AutomaticSize
645BottomImage: ContentId
553CanvasPosition: Vector2
553CanvasSize: UDim2
553ElasticBehavior: ElasticBehavior
553HorizontalScrollBarInset: ScrollBarInset
645MidImage: ContentId
553ScrollBarImageColor3: Color3
553ScrollBarImageTransparency: float
553ScrollBarThickness: int
553ScrollingDirection: ScrollingDirection
553ScrollingEnabled: bool
645TopImage: ContentId
553VerticalScrollBarInset: ScrollBarInset
553VerticalScrollBarPosition: VerticalScrollBarPosition
573ClearInertialScrolling(): null
462GetSampledInertialVelocity(): Vector2
573ScrollToTop(): null
inherited from GuiObject
553Active: bool
553AnchorPoint: Vector2
553AutomaticSize: AutomaticSize
553BackgroundColor3: Color3
553BackgroundTransparency: float
553BorderColor3: Color3
553BorderMode: BorderMode
553BorderSizePixel: int
553ClipsDescendants: bool
553Draggable: bool
588GuiState: GuiState
589Interactable: bool
553LayoutOrder: int
553NextSelectionDown: GuiObject
553NextSelectionLeft: GuiObject
553NextSelectionRight: GuiObject
553NextSelectionUp: GuiObject
553Position: UDim2
553Rotation: float
553Selectable: bool
553SelectionImageObject: GuiObject
553SelectionOrder: int
553Size: UDim2
553SizeConstraint: SizeConstraint
553Visible: bool
553ZIndex: int
462TweenPosition(endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
462TweenSize(endSize: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
462TweenSizeAndPosition(endSize: UDim2, endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
462DragBegin(initialPosition: UDim2)
462DragStopped(x: int, y: int)
483InputBegan(input: InputObject)
483InputChanged(input: InputObject)
483InputEnded(input: InputObject)
462MouseEnter(x: int, y: int)
462MouseLeave(x: int, y: int)
462MouseMoved(x: int, y: int)
462MouseWheelBackward(x: int, y: int)
462MouseWheelForward(x: int, y: int)
462SelectionGained()
462SelectionLost()
462TouchLongPress(touchPositions: Array, state: UserInputState)
462TouchPan(touchPositions: Array, totalTranslation: Vector2, velocity: Vector2, state: UserInputState)
462TouchPinch(touchPositions: Array, scale: float, velocity: float, state: UserInputState)
462TouchRotate(touchPositions: Array, rotation: float, velocity: float, state: UserInputState)
462TouchSwipe(swipeDirection: SwipeDirection, numberOfTouches: int)
462TouchTap(touchPositions: Array)
inherited from GuiBase2d
553AbsolutePosition: Vector2
553AbsoluteRotation: float
553AbsoluteSize: Vector2
553AutoLocalize: bool
553RootLocalizationTable: LocalizationTable
553SelectionBehaviorDown: SelectionBehavior
553SelectionBehaviorLeft: SelectionBehavior
553SelectionBehaviorRight: SelectionBehavior
553SelectionBehaviorUp: SelectionBehavior
553SelectionGroup: bool
525SelectionChanged(amISelected: bool, previousSelection: GuiObject, newSelection: GuiObject)
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Removed member index 2

HistoryMember
290AutoSizeCanvas: bool
290AutoSizeCanvasPadding: UDim2

Description

ScrollingFrame is a special Frame type with built-in scrolling interactivity and different ways to customize how the scrolling works.

Example ScrollingFrame on the screen containing a tabbed category bar and a list of magical items for the player to consider purchasing.

History 115

Members 25

AbsoluteCanvasSize

TypeDefault
Vector20, 0

The size of the area that is scrollable, in offsets. This property is set to the maximum of the CanvasSize property and the size of the children if AutomaticCanvasSize is set to something other than AutomaticSize.None.

This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 10

Tags: [ReadOnly, NotReplicated]

AbsoluteWindowSize

TypeDefault
Vector20, 0

The size of the frame, in offsets, without the scroll bars.

This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 3

Tags: [ReadOnly, NotReplicated]

AutomaticCanvasSize

TypeDefault
AutomaticSizeNone

This property is used to automatically size parent UI objects based on the size of its descendants. You can use this property to dynamically add text and other content to a ScrollingFrame at edit or run time and the size will adjust to fit that content.

When this property is set to an AutomaticSize value other than None, AbsoluteCanvasSize may resize depending on its child content.

History 4

BottomImage

TypeDefault
ContentIdrbxasset://textures/ui/Scroll/scroll-bottom.png

Image that displays on the bottom of a vertical scroll bar, or the right of a horizontal scroll bar (rotated 90° counterclockwise for a horizontal scroll bar).

Diagram showing the three image asset elements which construct a scrolling frame's scroll bar.

History 5

CanvasPosition

TypeDefault
Vector20, 0

Reflects the current positional offset of the canvas within the frame, in pixels, and sets the position of scroll bars accordingly. Note that this property doesn't do anything if scroll bars aren't visible.

History 4

CanvasSize

TypeDefault
UDim2{0, 0}, {2, 0}

Determines the size of the scrollable area. For an adaptive alternative based on the overall size of children within the ScrollingFrame, consider using AutomaticCanvasSize.

History 4

ClearInertialScrolling

Parameters (0)
No parameters.
Returns (1)
null

History 3

ElasticBehavior

TypeDefault
ElasticBehaviorWhenScrollable

This property determines if and when elastic scrolling is allowed on touch‑enabled devices. Defaults to WhenScrollable.

History 4

GetSampledInertialVelocity

Parameters (0)
No parameters.
Returns (1)
Vector2

History 2

HorizontalScrollBarInset

TypeDefault
ScrollBarInsetNone

Indicates whether CanvasSize is inset by ScrollBarThickness on the horizontal axis.

History 4

MidImage

TypeDefault
ContentIdrbxasset://textures/ui/Scroll/scroll-middle.png

Image which spans the area between TopImage and BottomImage (rotated 90° counterclockwise for a horizontal scroll bar). This image automatically scales to fill the space between the cap segments.

Diagram showing the three image asset elements which construct a scrolling frame's scroll bar.

History 5

ScrollBarImageColor3

TypeDefault
Color31, 1, 1

Determines how the scroll bar images (TopImage, MidImage, BottomImage) are colorized. When set to white, no colorization occurs. This property is useful for reusing image assets; if the source images are completely white with transparency, you can set the color of the entire scroll bar at once.

History 4

ScrollBarImageTransparency

TypeDefault
float0

Determines the opacity of the scroll bar images (TopImage, MidImage, BottomImage). A value of 0 is completely opaque and a value of 1 is completely transparent (invisible).

History 4

ScrollBarThickness

TypeDefault
int12

Thickness of the scroll bar in pixels; applies to both horizontal and vertical scroll bars. If set to 0, no scroll bars are rendered.

History 4

ScrollToTop

Parameters (0)
No parameters.
Returns (1)
null

History 3

ScrollingDirection

TypeDefault
ScrollingDirectionXY

This property determines the direction(s) in which scrolling is allowed. If scrolling is disallowed in a direction, the associated scroll bar will not appear. Defaults to ScrollingDirection.XY.

History 4

ScrollingEnabled

TypeDefault
booltrue

Determines whether scrolling is allowed on the frame. If false, no scroll bars will be rendered.

History 4

TopImage

TypeDefault
ContentIdrbxasset://textures/ui/Scroll/scroll-top.png

Image which displays on the top of a vertical scroll bar, or the left of a horizontal scroll bar (rotated 90° counterclockwise for a horizontal scroll bar).

Diagram showing the three image asset elements which construct a scrolling frame's scroll bar.

History 5

VerticalScrollBarInset

TypeDefault
ScrollBarInsetNone

Indicates whether CanvasSize is inset by ScrollBarThickness on the vertical axis.

History 4

VerticalScrollBarPosition

TypeDefault
VerticalScrollBarPositionRight

Indicates whether the vertical scroll bar is positioned to the left or right of the canvas. Defaults to VerticalScrollBarPosition.Right.

History 4

Removed members 2

AutoSizeCanvas

TypeDefault
bool

History 6

AutoSizeCanvasPadding

TypeDefault
UDim2

History 6

Settings