XLQP Gen1
ElementsMedia & visuals

AddDrawingGrid

Adds a cell-based drawing canvas with brush and callback controls.

AddDrawingGrid

What it does

Adds a cell-based drawing canvas with brush and callback controls.

When to use it

Use it for pixel art, map editors, selection grids, or other interactive cell layouts.

ElementFunction:AddDrawingGrid(GridConfig)

local DrawingGrid = Visuals:AddDrawingGrid({
    Name = "Drawing Grid",
    Height = 240,
    Boxes = true,
    Columns = 32,
    Rows = 20,
    BrushSize = 2,
    Color = Color3.fromRGB(255, 255, 255),
    Callback = function(grid)
        print("drawing grid updated", grid.Tool, grid.Boxes)
    end
})

Behavior and return value

Call this method on the compatible section, tab, panel, or element container shown by the signature. Store the returned value when you need to update, read, or destroy the element later.

Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.