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()

count()

fullWidgetAreaGeometry()

insertItem(index,ย item)

insertItems(index,ย items)

insertWidget(index,ย widget)

insertWidgets(index,ย widgets)

itemAt(index)

iterWidgets([onlyVisible,ย recurse])

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