GridPane

GridPane, in the bajaui palette, provides a flexible layout based on a grid with a predefined number of columns. GridPane will layout its children as a series of columns and rows. You can configure extra space in the rows and columns a number of ways using the pane’s many properties.

Cells are laid out left to right, flowing to the next row based on the columnCount property. Row height is determined by the max preferred height of the widgets in the row. Column width is determined by the max preferred width of the widgets in the column. If Layout (visible via Property Sheet view) is set to Fill then all widgets in a given row are sized to fill the row height. Otherwise the widgets use their preferred height and are aligned accordingly

By default if the actual space of the pane is bigger than the preferred size, then the hAlign and vAlign properties determine where to put the extra space. Or the stretchColumn and stretchRow properties may be used to indicate that a specific column or row should be stretched to fill the additional space. Enabling the stretch feature trumps pane alignment.



NameValueDescription
bandBrushSolid, Gradient, Image, or Null (default)Sets row color. Selecting either solid, gradient, or image opens a Chooser window.
colorRowstrue or false (default) When set to true, alternating rows are shaded to produced a striped effect.
columnCount2 (default)Sets the number of columns (i.e. cells per row).
columnGap3.00 pixelsSets the gap between column (i.e. cells in a row).
enabledtrue (default) or falseActivates and deactivates use of the component.
halignLeft, Center (default), Right, or FillSets horizontal alignment for the pane.
layer Allows you to add/change/remove a named layer assignment for the pane. Assigning a layer requires one or more previously configured named layers.
rowAlignTop, Center (default), Bottom, or FillSets vertical alignment for cells (i.e. cell contents) in a row.
rowGap3.00 pixelsSets space between rows.
stretchColumn-1The stretchColumn property may be used to indicate that a specific column should be stretched to fill the additional space. Enabling the stretch feature overrides
stretchRow-1The stretchRow property may be used to indicate that a specific row should be stretched to fill the additional space.
uniformColumnWidthtrue or false (default) Column width is determined by the max preferred width of the widgets in the column. If uniformColumnWidth is true then all column widths are sized using the max column.
uniformColumnHeighttrue or false (default) Row height is determined by the max preferred height of the widgets in the row. If uniformRowHeight is true then all row heights are sized using the max row.
valignTop, Center (default), Bottom, or FillSets vertical alignment for the pane.
visibletrue (default) or falseWhen true the object is visible. When false the object is hidden.

Layout properties

The Layout property, visible in a Property Sheet view of the component, allows you to set positioning coordinates and dimensions for the pane.

NameValueDescription
X0.00Provides the horizontal X-coordinate for absolute positioning of the pane. Units are either Abs (default) or Percent.
Y0.00Provides the vertical Y-coordinate for absolute positioning of the pane. Units are either Abs (default) or Percent.
Width100.00Provides the width dimension of the pane in pixels. Units specify either an absolute value, a percentage, or a preferred value:Abs(default) orPercent, orPref.
Height100.00Provides the height dimension of the pane in pixels. Units specify either an absolute value, a percentage, or a preferred value:Abs(default) orPercent, orPref.
FillcheckboxWhen Fill is selected all widgets in a given row are sized to fill the row height. When deselected the widgets in a given row use their preferred height and alignment.