GridFrame (hwx.gui)#

class GridFrame(*childrenList, **kwds)#

Bases: Frame

A Frame with a GridLayout.

GridFrame groups controls in a grid layout so they can be sized and/or decorated as one.

Example

from hwx import gui
# Create widgets and arrange them in a grid frame container

grid_frame = gui.GridFrame(
(gui.Label("Label 1"), gui.PushButton("Click me"), gui.LineEdit(1.0)),
(gui.Label("Label 2"), gui.PushButton("Click me"), gui.LineEdit(2.0)),
(gui.Label("Label 3"), gui.PushButton("Click me"), gui.LineEdit(3.0)),
# nrows   = 3,
# spacing = 5,  # Number of pixels of padding space around each cell
# border  = 5,  # Number of pixels around the frame
# margin  = 5,  # Number of Pixels of white space outside the border
# ncols   = 3,
)

show(grid_frame)