ScrollingFrame
A container with vertical scrolling.
Syntax
Signature
Drawing.create("ScrollingFrame", Properties: table?) -> DrawingControlAliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Properties | table? | Initial property values. Omitted properties use the defaults below. |
Returns
| Type | Description |
|---|---|
DrawingControl | A live control. Call Destroy to remove it and its descendants. |
Properties
Inherits the shared layout properties. Positions are relative to Parent. BackgroundTransparency is 0 for opaque and 1 for transparent.
| Property | Type | Default / behavior |
|---|---|---|
CanvasSize | number | Content height in pixels; defaults to 0. |
ScrollOffset | number | Vertical offset in pixels; defaults to 0. Wheel input clamps it to the content range. |
ClipsDescendants | boolean | Set to true to hide content outside the viewport. |
Events
| Event | Arguments | Description |
|---|---|---|
MouseButton1Down | () | Left mouse button pressed inside the control. |
MouseButton1Up | () | Left mouse button released after a press. |
MouseButton1Click | () | Press and release completed inside the control. |
Every control supports Changed and GetPropertyChangedSignal(Property). UseDestroy()to remove a control and its children.
Notes
CanvasSize is the content height in pixels and ScrollOffset is the current vertical offset. Set ClipsDescendants to true to hide child content outside the viewport.
Example
Luau
local Control = Drawing.create("ScrollingFrame", {Size = Vector2.new(280, 160), CanvasSize = 400, ClipsDescendants = true})
local Label = Drawing.create("TextLabel", {Parent = Control, Position = Vector2.new(8, 300), Text = "Scroll to see me"})