GridPane is a container which lays out its children in a grid from left to right with a new row started based on numCols
.
TODO: this API going to change, most likely there will be a switch to per col/per row configuration
Slots
- expandColSource
-
Int? expandCol := null
If non-null, then this is a zero based column number to assign any extra width available beyond the preferred width. A negative number indexes from the last column. Default is null.
- expandRowSource
-
Int? expandRow := null
If non-null, then this is a zero based row number to assign any extra height available beyond the preferred height. A negative number indexes from the last row. Default is null.
- halignCellsSource
-
Halign halignCells := Halign.left
Horizontal alignment of the individual cells. Defaults to left.
- halignPaneSource
-
Halign halignPane := Halign.left
Horizontal alignment of the entire pane - this defines where the extra horizontal space beyond the preferred width goes. This field only makes sense when expandCol is null. Defaults to left.
- hgapSource
-
Int hgap := 4
Horizontal gap is number of pixels between left and right edges of adjacent cells. Default is 4.
- numColsSource
-
Int numCols := 1
Number of columns before wrapping to a new row. Default is 1.
- onLayoutSource
-
override Void onLayout()
Overrides fwt::Widget.onLayout
Doc inherited from fwt::Widget.onLayout
Handle the layout event. The method is only called Pane containers. Custom panes must override this method to set the bounds on all their children.
- prefSizeSource
-
override Size prefSize(Hints hints := Hints.def)
Overrides fwt::Pane.prefSize
Doc inherited from fwt::Pane.prefSize
Compute the preferred size of this widget. The hints indicate constraints the widget should consider in its calculations. If no constraints are known for width, then
hints.w
will be null. If no constraints are known for height, thenhints.h
will be null. - uniformColsSource
-
Bool uniformCols := false
If true, then all columns are given a uniform width which is computed from the widest column. If false then columns might be laid out with variable widths based on the width of the cells. Default is false.
- uniformRowsSource
-
Bool uniformRows := false
If true, then all rows are given a uniform height which is computed from the highest row. If false then rows might be laid out with variable heights based on the highest of the cells. Default is false.
- valignCellsSource
-
Valign valignCells := Valign.center
Vertical alignment of the individual cells. Defaults to center.
- valignPaneSource
-
Valign valignPane := Valign.top
Vertial alignment of the entire pane - this defines where the extra vertial space beyond the preferred height goes. This field only makes sense when expandRow is null. Defaults to top.
- vgapSource
-
Int vgap := 4
Vertical gap is number of pixels between bottom and top edges of adjacent cells. Default is 4.