HFrame (hwx.gui)#

class HFrame(*childrenList, **kwds)#

Bases: Frame

A Frame with a HBoxLayout.

HFrame groups controls horizontally so they can be sized and/or decorated as one.


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

def onVisible(event): label.visible = event.value

def onEnabled(event): label.enabled = event.value

visible = gui.CheckBox("Visible?", value=True, command=onVisible)
enabled = gui.CheckBox("Enabled?", value=True, command=onEnabled)
label = gui.Label("A Label")
frame_label = gui.HFrame(label)

hframe = gui.HFrame(visible, enabled, label)