Split¶
The splitter layout classes provide a mechanism to horizontally or vertically stack child widgets, where the available space can be manually specified by the user.
Example:
from flexx import ui
class Example(ui.Widget):
def init(self):
with ui.SplitPanel(orientation='h'):
ui.Label(text='red', style='background:#f77;')
with ui.SplitPanel(orientation='v'):
ui.Label(text='green', style='background:#7f7;')
ui.Label(text='blue', style='background:#77f')
ui.Label(text='purple', style='background:#f7f;')
-
class
flexx.ui.
SplitPanel
(*init_args, **kwargs)¶ Inherits from:
Layout
Layout to split space for widgets horizontally or vertically.
The Splitter layout divides the available space among its child widgets in a similar way that Box does, except that the user can divide the space by dragging the divider in between the widgets.
-
orientation
¶ property – The orientation of the child widgets. ‘h’ or ‘v’. Default horizontal.
-