TTkLayout🌢️

class TTkLayout(**kwargs)[source]🌢️

Bases: TTkLayoutItem

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 moving TTkWindow because the widgets are not automatically rearranged after a layout event
╔════════════════════════════╗
β•‘   pos(4,2)                 β•‘
β•‘   β”Œβ”€β”€β”€β”€β”€β”€β”€β”   pos(16,4)    β•‘
β•‘   β”‚Widget1β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β•‘
β•‘   β”‚       β”‚   β”‚ Widget2 β”‚  β•‘
β•‘   β”‚       β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘
β•‘   β”‚       β”‚                β•‘
β•‘   β””β”€β”€β”€β”€β”€β”€β”€β”˜                β•‘
β•‘                            β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Methods🌢️

addItem(item)[source]🌢️
addItems(items)[source]🌢️
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

children()[source]🌢️
count()[source]🌢️
fullWidgetAreaGeometry()[source]🌢️
insertItem(index, item)[source]🌢️
insertItems(index, items)[source]🌢️
insertWidget(index, widget)[source]🌢️
insertWidgets(index, widgets)[source]🌢️
itemAt(index)[source]🌢️
iterWidgets(onlyVisible=True, recurse=True)[source]🌢️
lowerWidget(widget)[source]🌢️
parentWidget()[source]🌢️
raiseWidget(widget)[source]🌢️
removeItem(item)[source]🌢️
removeItems(items)[source]🌢️
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

replaceItem(item, index)[source]🌢️
setGeometry(x, y, w, h)[source]🌢️
setParent(parent)[source]🌢️
update(*args, **kwargs) None[source]🌢️

TTkLayout Attributes🌢️

LAYER0

LAYER1

LAYER2

LAYER3

LAYERMASK

zSortedItems