GridItem¶
A keyed panel that holds existing Python controls.

A real Linux/X11 native capture in light appearance. The same control also supports the initial dark theme.
Runnable example¶
import gpyui as ui
control = ui.GridItem("tasks", title="Task", children=[ui.TextInput("Review the layout")]).style(padding=8)
grid = ui.GridLayout([ui.GridArea("tasks", col_span=8, row_span=3)], children=[control])
app = ui.Application(ui.Column([grid]), title="GridItem", width=640, height=340)
app.run()
Run this in a fresh Python process on a desktop with the native build installed.
Properties¶
| Property | Default | Type / accepted values | Update |
|---|---|---|---|
key |
Required | unique stable string key | Constructor only |
title |
"" |
str; optional drag handle label | Assignment |
Accepts children=[...], a with block, and runtime add, insert, remove, clear, set_children or assignment to children. Each child has one parent. Reuse existing instances to preserve native state; see runtime composition.
Construct explicit child lists outside a composition context, as in the example. Inside a with block, construct the parent first and then its children.
All controls support visible and dispose(). Hiding or detaching retains native state; disposal permanently releases it. See Control.
Events and state¶
This wrapper exposes no Python activation/change handler. Update its mutable properties by assignment from a running callback. Native behavior remains in Rust.
Contract and limits¶
Give panels with editors a title so the header can move the panel and the editor can keep focus.
All controls accept pixel layout and semantic theme styling through .style(...). Collections are copied on assignment/read: reassign them to submit updates.
Python implementation · Native builders · Full coverage and remaining Kit APIs