zui docs v0.0.5
GitHub ↗
Foundation and layout Container Native Qt

Constrained Box

Constrained Box is a native Zui container in the foundation and layout catalog, with 8 component-specific properties.

Usage

Ruby example

Paste this complete Builder example inside the app surface from the Quickstart. Replace illustrative asset paths with files from your project.

Ruby
constrained_box min_width: 280, max_width: 640,
  min_height: 160, max_height: 360 do
  card { text "Content stays inside the declared bounds." }
end
API

Component properties

8 component-specific values, plus shared item and layout properties.

widthWidth configuration for Constrained Box.property
heightHeight configuration for Constrained Box.property
min_widthMin width configuration for Constrained Box.property
min_heightMin height configuration for Constrained Box.property
max_widthMax width configuration for Constrained Box.property
max_heightMax height configuration for Constrained Box.property
clipClip configuration for Constrained Box.property
visibleVisible configuration for Constrained Box.property
Show 14 shared item properties
enabledopacityscalerotationzfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

Subscribe with on widget, :event and keep behavior in Ruby.

clickNative event payload