zng::layout

Function width

source
pub fn width(child: impl UiNode, width: impl IntoVar<Length>) -> impl UiNode
Expand description

P Exact width of the widget.

When set the widget is layout with exact size constraints, clamped by the contextual max. Relative values are computed from the constraints maximum bounded width.

This property disables inline layout for the widget. This property sets the WIDGET_SIZE width.

See also force_width to deliberately break layout and cause out-of-bounds rendering when the exact width cannot fit in the contextual min/max.

ยงsize

You can set both width and height at the same time using the size property.