public class HBoxLayout extends Layout:
Horizontal layout.
Widgets are placed from left to right. Extra horizontal space is distributed according to LayoutParams.growX; when no explicit layout parameter is set, SizePolicy.EXPANDING contributes a default grow weight.
layout = HBoxLayout(spacing=8)
row = Container(layout)
layout.add(Button("Cancel"))
ok = Button("Save")
ok.layoutParams = LayoutParams(growX=1)
layout.add(ok)
canvas = PreviewCanvas()
canvas.sizePolicy = (SizePolicy.EXPANDING, SizePolicy.EXPANDING)
layout.add(canvas)| Modifier and Type | Member | Description |
|---|---|---|
| public property | alignalign as String = "fill" |
No summary. |
| public property | spacingspacing as Int = 8 |
No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | HBoxLayoutHBoxLayout(spacing as Int = 8, align as String = "fill"): |
No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | layoutlayout(container as Container) as Void: |
No summary. |