Splitter (hwx.gui)#
- class Splitter(*childrenList, **kwds)#
Bases:
Widget
A Splitter Widget.
A Splitter controls the relative size of the children widgets by modifying the boundary between them. Splitter widget allows to create and control a dynamic layout of resizeable and collapsible panes. This can be useful when the areas that the splitter divides have variable dimensions.
For example, the Demo dialog box shows a splitter between the text edit area and the run edit. When the mouse pointer is located in proximity of the splitter, it will change appearance.
# Name
Type
property
property
property
property
Example
from hwx import gui # Create two widget and separate them with a horizontal splitter first = gui.TextEdit(text=""" <p>pane 1</p>""", readonly=True, ) second = gui.TextEdit(text=""" <p>pane 2</p>""", readonly=True, ) splitter = gui.Splitter(children=(first, second), ) # Try changing the orientation to "vertical" splitter.orientation = "horizontal" show(splitter)
- property collapsible#
Returns and sets if the children can be resized down to size 0.
- property opaqueResize#
Updates the widgets when the side is being dragged.
- property orientation#
Specifies the orientation of the widget.
- property sizes#
A list of widths (horizontal) or heights(vertical) in pixels.