TermTk.TTkLayouts.layout
Layout [Tutorial]
TTkLayoutItem
- class TTkLayoutItem(*args, **kwargs)[source]
TTkLayoutItem
is the base class of layout Items inherited byTTkLayout
,TTkWidgetItem
, and all the derived layout managers.- Parameters
row (int) – (used only in the
TTkGridLayout
), the row of the grid, optional, defaults to Nonecol (int) – (used only in the
TTkGridLayout
), the col of the grid, optional, defaults to Nonerowspan (int) – (used only in the
TTkGridLayout
), the rows used by this, optional, defaults to 1colspan (int) – (used only in the
TTkGridLayout
), the cols used by this, optional, defaults to 1layoutItemType (
LayoutItemTypes
) – The Type of this class, optional, defaults to TTkK.NONEalignment (
Alignment
) – The alignment of this item in the layout (not yet used)
TTkLayout
- class TTkLayout(*args, **kwargs)[source]
- The
TTkLayout
class is the base class of geometry managers. <br/>It allows free placement of the widgets in the layout area. <br/>Used mainly to have free range movingTTkWindow
because the widgets are not automatically rearranged after a layout event╔════════════════════════════╗ ║ pos(4,2) ║ ║ ┌───────┐ pos(16,4) ║ ║ │Widget1│ ┌─────────┐ ║ ║ │ │ │ Widget2 │ ║ ║ │ │ └─────────┘ ║ ║ │ │ ║ ║ └───────┘ ║ ║ ║ ╚════════════════════════════╝
- addWidget(widget)[source]
Add a widget to this Layout
- Parameters
widget (
TTkWidgets
) – the widget to be added
- addWidgets(widgets)[source]
Add a list of widgets to this Layout
- Parameters
widgets (list of
TTkWidgets
) – the widget to be added
- layer()
- parent()
- removeWidget(widget)[source]
Remove a widget from this Layout
- Parameters
widget (
TTkWidgets
) – the widget to be removed
- removeWidgets(widgets)[source]
Remove a list of widget from this Layout
- Parameters
widgets (list of
TTkWidgets
) – the widget to be removed
- setLayer(layer)
- setOffset(x, y)