A separator used to visually distinguish two sections of content in a layout.
.. rst-class:: widget-support
.. csv-filter:: Availability (:ref:`Key <api-status-key>`) :header-rows: 1 :file: ../../data/widgets_by_platform.csv :included_cols: 4,5,6,7,8,9,10 :exclude: {0: '(?!(Divider|Component))'}
To separate two labels stacked vertically with a horizontal line:
import toga
from toga.style import Pack, COLUMN
box = toga.Box(
children=[
toga.Label("First section"),
toga.Divider(),
toga.Label("Second section"),
],
style=Pack(direction=COLUMN, flex=1, padding=10)
)
The direction (horizontal or vertical) can be given as an argument. If not specified, it will default to horizontal.
.. autoclass:: toga.Divider :members: :undoc-members: