Class · inherits GuiObject
ScrollingFrame
ScrollingFrame is a special Frame type with built-in scrolling
interactivity and different ways to customize how the scrolling works.
About ScrollingFrame
ScrollingFrame is a special Frame type with built-in scrolling
interactivity and different ways to customize how the scrolling works.
Properties 20
AbsoluteCanvasSize
: Vector2ReadOnlyNotReplicatedThe size of the area that is scrollable, in offsets.The size of the area that is scrollable, in offsets. This property is set to the maximum of the
CanvasSizeproperty and the size of the children ifAutomaticCanvasSizeis set to something other thanAutomaticSize.None.AbsoluteWindowSize
: Vector2ReadOnlyNotReplicatedThe size of the frame, in offsets, without the scroll bars.The size of the frame, in offsets, without the scroll bars. This read-only property represents the visible content area of the
ScrollingFrame: the frame'sAbsoluteSizeminus the space occupied by any currently visible scroll bar gutters (ScrollBarThickness). If no scroll bars are visible, this equals the frame's absolute size.AutomaticCanvasSize
: AutomaticSizeDetermines whetherScrollingFrame.CanvasSizeis resized based on child content.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
ScrollingFrameat edit or run time and the size will adjust to fit that content.When this property is set to an
AutomaticSizevalue other thanNone,AbsoluteCanvasSizemay resize depending on its child content.BottomImage
: ContentIdImage 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).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).
BottomImageContent
: ContentTheContent-typed equivalent ofBottomImage.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). Only supports asset URIs as textures.
CanvasPosition
: Vector2Reflects the current positional offset of the canvas within the frame, in pixels, and sets the position of scroll bars accordingly.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.
CanvasSize
: UDim2Determines the size of the scrollable area.Determines the size of the scrollable area. For an adaptive alternative based on the overall size of children within the
ScrollingFrame, consider usingAutomaticCanvasSize.ElasticBehavior
: ElasticBehaviorDetermines if and when elastic scrolling is allowed on touch‑enabled devices.This property determines if and when elastic scrolling is allowed on touch‑enabled devices. Defaults to
WhenScrollable.HorizontalScrollBarInset
: ScrollBarInsetIndicates whetherCanvasSizeis inset byScrollBarThicknesson the horizontal axis.Indicates whether the scrollable canvas is inset by
ScrollBarThicknessto account for the horizontal scroll bar. Because the horizontal scroll bar occupies space along the bottom edge, this inset reduces the canvas height. Defaults toScrollBarInset.None.MidImage
: ContentIdImage which spans the area betweenTopImageandBottomImage(rotated 90° counterclockwise for a horizontal scroll bar).Image which spans the area between
TopImageandBottomImage(rotated 90° counterclockwise for a horizontal scroll bar). This image automatically scales to fill the space between the cap segments.MidImageContent
: ContentTheContent-typed equivalent ofMidImage.Image which spans the area between
TopImageContentandBottomImageContent(rotated 90° counterclockwise for a horizontal scroll bar). This image automatically scales to fill the space between the cap segments. Only supports asset URIs as textures.ScrollBarImageColor3
: Color3Determines how the rendered scroll bar images are colorized.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.ScrollBarImageTransparency
: floatDetermines the opacity of the scroll bar images.Determines the opacity of the scroll bar images (
TopImage,MidImage,BottomImage). A value of0is completely opaque and a value of1is completely transparent (invisible).ScrollBarThickness
: intThickness of the scroll bar in pixels; applies to both horizontal and vertical scroll bars.Thickness of the scroll bar in pixels; applies to both horizontal and vertical scroll bars. If set to
0, no scroll bars are rendered.ScrollingDirection
: ScrollingDirectionDetermines the direction(s) in which scrolling is allowed.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.ScrollingEnabled
: booleanDetermines whether scrolling is allowed on the frame.Determines whether scrolling is allowed on the frame. If
false, no scroll bars will be rendered.TopImage
: ContentIdImage 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).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).
TopImageContent
: ContentTheContent-typed equivalent ofTopImage.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). Only supports asset URIs as textures. Defaults to the built-in scroll bar top cap texture (
rbxasset://textures/ui/Scroll/scroll-top.png).VerticalScrollBarInset
: ScrollBarInsetIndicates whetherCanvasSizeis inset byScrollBarThicknesson the vertical axis.Indicates whether the scrollable canvas is inset by
ScrollBarThicknessto account for the vertical scroll bar. Because the vertical scroll bar occupies space along a side edge, this inset reduces the canvas width. Defaults toScrollBarInset.None.VerticalScrollBarPosition
: VerticalScrollBarPositionIndicates whether the vertical scroll bar is positioned to the left or right of the canvas.Indicates whether the vertical scroll bar is positioned to the left or right of the canvas. Defaults to
VerticalScrollBarPosition.Right.
Methods 2
GetScrollVelocity
() → Vector2Returns aVector2representing the current inertial scroll velocity after the user stops their input.Returns a
Vector2representing the current inertial scroll velocity after the user stops their input, for example lifts their finger off theScrollingFrameon a touch-enabled device.Note that this method may only produce noticable data on an actual device or in an emulated scenario from Studio's Device Emulator.
ResetScrollVelocity
() → ()Resets the inertial scroll velocity of theScrollingFrameto0on both axes.
ScrollingFrame also has every member of GuiObject. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.