Frame

A rectangular container for retained controls.

Syntax

Signature
Drawing.create("Frame", Properties: table?) -> DrawingControl

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
Propertiestable?Initial property values. Omitted properties use the defaults below.

Returns

TypeDescription
DrawingControlA 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.

PropertyTypeDefault / behavior
DraggablebooleanDefaults to false; drag with the left mouse button.
ClipsDescendantsbooleanDefaults to false; clips child drawings to this frame.

Events

EventArgumentsDescription
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

Child positions are relative to the frame. Draggable allows pointer dragging and ClipsDescendants clips overflowing child content.

Example

Luau
local Control = Drawing.create("Frame", {Size = Vector2.new(320, 180), Draggable = true, ClipsDescendants = true})