bootstack.TabPage#

class bootstack.TabPage(page_widget, *, key, owner, layout='column', padding=None, gap=0, horizontal_items=None, vertical_items=None, grow_items=False, columns=None, rows=None, auto_flow='row')#

Bases: object

A handle for one tab — both a layout context and a live controller.

Returned by Tabs.add() and by Tabs.item() / items(). Use it as a with block to place child widgets, and read key / read or set label, or call select() / hide() / show() / remove() to drive the tab afterward.

As a context manager it accepts the same layout kwargs as the standalone layout containers — layout=, gap=, horizontal_items=, vertical_items=, grow_items=, columns=, rows=, auto_flow=.

property key: str#

The tab’s unique key, used with Tabs.item() / select().

property label: str#

The text shown on the tab. Assigning a new value relabels the tab.

guide_layout(child, **layout_kw)#
hide()#

Hide this tab without removing it. Restore with show().

remove()#

Remove this tab and its page entirely.

select()#

Select (focus) this tab.

show()#

Restore this tab after it was hidden.