ImageLabel
Displays an image.
Syntax
Signature
Drawing.create("ImageLabel", 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 |
|---|---|---|
Image | string | Encoded image bytes. Uses the same decoder as Drawing Image primitives. |
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
BackgroundTransparency controls image opacity and CornerRadius controls rounded corners. Image uses the native Drawing image decoder.
Example
Luau
local Control = Drawing.create("ImageLabel", {Size = Vector2.new(128, 128), Image = readfile("Icon.png")})