Skip to content

Search

Documentation

widget_box

The rarer words about a box, which any kind may carry: what its size measures, what it keeps for what runs past it, and how it lays out on its own.

On this page

ui · 5 properties · UI

The rarer words about a box, which any kind may carry: what its size measures, what it keeps for what runs past it, and how it lays out on its own.

In a scene, widget_box is the node key that applies it. A script reaches each property below as a field on node.widget_box: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_box.get() and node.widget_box.set(table).

Properties

property type default description
box_sizing enum border What width and height measure: border, the whole box, or content, the box inside padding and border One of border, content.
contain flags [] Containment: layout or paint makes the box lay out on its own, and layout also gives it no baseline for a parent's baseline alignment One of layout, paint.
overflow enum visible What the layout keeps for content past this widget's box: scroll keeps scrollbar_width clear inside its edge, the others nothing. Layout only: a container never gives a child a floor of its own content here (min_width is that floor), a scroll kind is what scrolls, and each kind clips as it draws One of visible, clip, hidden, scroll.
safe_align bool false Where align_items, align_self, align_content or justify would push a child past its container's start, put it at the start instead, so the start stays in view
scrollbar_width float 0 The room a box with overflow = "scroll" keeps clear inside its edge for a bar, in design pixels At least 0.

Are you sure?