CollapsibleFrame (hwx.gui)#
- class CollapsibleFrame(text, children, expanded=False, **kwds)#
Bases:
Frame
A Frame with a flat button and subfame that is toggled visible/invisible as the label is clicked.
The button causes the container to expand or contract. It is used when there is a need to consolidate and hide/show grouped widgets.
# Name
Type
property
# Name
Description
resizeForAlignment
(frames, val=35)Adjust sizes so things line up
Example
from hwx import gui # Create various widgets and arrange them in a collapsible frame container icon = gui.IconLabel(icon=("fdmSpeedAccuracyImageStrip_48.png", (7, 0)), size=(48, 48), ) speedAccuracy = gui.VRadioButtons( values=(("faster", "Faster"), ("accurate", "More Accurate"),), ) layout = gui.HBoxLayout((icon, 40, speedAccuracy), ) frame = gui.CollapsibleFrame(text="Speed Accuracy Settings", expanded=False, # initial configuration of the CollapsibleFrame children=(layout), ) show(frame)
- property text#
Returns and sets the text of the CollapsibleFrame.