TTkMenuBarLayout🌶️

class TTkMenuBarLayout(**kwargs)[source]🌶️

Bases: TTkHBoxLayout

Slots🌶️

Methods🌶️

addMenu(text: TTkString, data: object = None, checkable: bool = False, checked: bool = False, alignment=Alignment.LEFT_ALIGN)[source]🌶️

Methods Inherited from: TTkGridLayout

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

columnMinWidth()

Return the minimum width used for empty columns.

getSizes()

Return cached horizontal and vertical slot sizes.

gridItems()

Return the internal 2D grid matrix of layout items.

gridSize()

Return current allocated grid size as (rows, cols).

insertColumn(col)

Insert an empty column at col and shift items to the right.

insertRow(row)

Insert an empty row at row and shift items downward.

itemAtPosition(row, col)

Return the item occupying (row, col).

maximumColWidth(gridCol)

Return the maximum width allowed for a column.

maximumHeight()

Return the layout maximum height from all grid rows.

maximumRowHeight(gridRow)

Return the maximum height allowed for a row.

maximumWidth()

Return the layout maximum width from all grid columns.

minimumColWidth(gridCol)

Return the minimum width required for a column.

minimumHeight()

Return the layout minimum height from all grid rows.

minimumRowHeight(gridRow)

Return the minimum height required for a row.

minimumWidth()

Return the layout minimum width from all grid columns.

removeItem(item)

Remove a single layout item from the grid.

removeItems(items)

Remove multiple layout items and clear their grid cells.

removeWidget(widget)

Remove a single widget from the grid.

removeWidgets(widgets)

Remove multiple widgets from the grid.

repack()

Remove empty rows/columns and compact item row/column indices.

replaceItem(item, index)

Not implemented for grid layout indexed replacement.

rowMinHeight()

Return the minimum height used for empty rows.

setColumnMinWidth(cmw)

Set the minimum width used for empty columns.

setRowMinHeight(rmh)

Set the minimum height used for empty rows.

update(*args, **kwargs)

Recompute cell geometry and update child widgets/layouts.

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

Return the list of direct child layout items.

clear()

Remove and detach all items from this layout.

count()

Return the number of direct child layout items.

fullWidgetAreaGeometry()

Return the bounding geometry that encloses all child items.

insertItem(index, item)

Insert a single item at index.

insertItems(index, items)

Insert multiple items at index and re-parent them.

insertWidget(index, widget)

Insert a widget at index.

insertWidgets(index, widgets)

Insert widgets at index.

itemAt(index)

Return the item at index or None when out of range.

iterWidgets([onlyVisible, recurse, reverse])

Iterate over all widgets in the layout.

layoutItemType()

Return TTkK.LayoutItemTypes.LayoutItem.

lowerWidget(widget)

Lower a widget (and its branch) to the bottom z-order.

parentWidget()

Return the widget owning this layout branch.

raiseWidget(widget)

Raise a widget (and its branch) to the top z-order.

removeItem(item)

Remove a single layout item from the grid.

removeItems(items)

Remove multiple layout items and clear their grid cells.

removeWidget(widget)

Remove a single widget from the grid.

removeWidgets(widgets)

Remove multiple widgets from the grid.

replaceItem(item, index)

Not implemented for grid layout indexed replacement.

setGeometry(x, y, w, h)

Set layout geometry and propagate a layout update when changed.

setParent(parent)

Set the parent layout item and propagate parent widget ownership.

update(*args, **kwargs)

Recompute cell geometry and update child widgets/layouts.

TTkMenuBarLayout Attributes🌶️

LAYER0

LAYER1

LAYER2

LAYER3

LAYERMASK

zSortedItems

Return child items sorted by z-order.