TTkGridLayout🌶️

class TTkGridLayout(*, columnMinWidth: int = 0, rowMinHeight: int = 0, **kwargs)[source]🌶️

Bases: TTkLayout

The grid layout allows an automatic place all the widgets in a grid, <br/> the empty rows/cols are resized to the “rowMinHeight,columnMinWidth” parameters

TTkGridLayout        ┌┐ columnMinWidth
 ╔═════════╤═════════╤╤═════════╗
 ║ Widget1 │ Widget2 ││ Widget3 ║
 ║ (0,0)   │ (0,1)   ││ (0,3)   ║
 ╟─────────┼─────────┼┼─────────╢ ┐ rowMinHeight
 ╟─────────┼─────────┼┼─────────╢ ┘
 ║ Widget4 │         ││         ║
 ║ (2,0)   │         ││         ║
 ╟─────────┼─────────┼┼─────────╢
 ║         │         ││ Widget5 ║
 ║         │         ││ (3,3)   ║
 ╚═════════╧═════════╧╧═════════╝
Parameters:
  • columnMinWidth (int) – the minimum width of the column, optional, defaults to 0

  • rowMinHeight (int) – the minimum height of the column, optional, defaults to 0

Slots🌶️

Methods🌶️

columnMinWidth()[source]🌶️
getSizes()[source]🌶️
gridItems()[source]🌶️
gridSize()[source]🌶️
insertColumn(col)[source]🌶️
insertRow(row)[source]🌶️
itemAtPosition(row: int, col: int)[source]🌶️
maximumColWidth(gridCol: int) int[source]🌶️
maximumHeight() int[source]🌶️

process the widgets and get the min size

maximumRowHeight(gridRow: int)[source]🌶️
maximumWidth() int[source]🌶️

process the widgets and get the min size

minimumColWidth(gridCol: int) int[source]🌶️
minimumHeight() int[source]🌶️

process the widgets and get the min size

minimumRowHeight(gridRow: int)[source]🌶️
minimumWidth() int[source]🌶️

process the widgets and get the min size

repack()[source]🌶️
rowMinHeight()[source]🌶️
setColumnMinWidth(cmw)[source]🌶️
setRowMinHeight(rmh)[source]🌶️

Methods Inherited from: TTkLayout

addItem(item[, row, col, rowspan, colspan, ...])

Add the item to this TTkGridLayout

addItems(items[, row, col, rowspan, ...])

Add the items to this TTkGridLayout

addWidget(widget[, row, col, rowspan, ...])

Add the widget to this TTkGridLayout, this function uses addItem()

addWidgets(widgets[, row, col, rowspan, ...])

Add the widgets to this TTkGridLayout, this function uses addItem()

children()

clear()

count()

fullWidgetAreaGeometry()

insertItem(index, item)

insertItems(index, items)

insertWidget(index, widget)

insertWidgets(index, widgets)

itemAt(index)

iterWidgets([onlyVisible, recurse, reverse])

Iterate over all widgets in the layout.

lowerWidget(widget)

parentWidget()

raiseWidget(widget)

removeItem(item)

removeItems(items)

removeWidget(widget)

Remove a widget from this Layout

removeWidgets(widgets)

Remove a list of widget from this Layout

replaceItem(item, index)

setGeometry(x, y, w, h)

setParent(parent)

update(*args, **kwargs)

TTkGridLayout Attributes🌶️

LAYER0

LAYER1

LAYER2

LAYER3

LAYERMASK

zSortedItems