bootstack.StackPage#

class bootstack.StackPage(page_widget, *, key, owner, layout='vstack', padding=None, gap=0, fill_items=None, expand_items=None, anchor_items=None, columns=None, rows=None, sticky_items=None, auto_flow='row')#

Bases: object

A handle for one page — both a layout context and a navigation target.

Returned by PageStack.add() and by PageStack.item() / items(). Use it as a with block to place child widgets, and read key or call navigate() to show the page afterward.

As a context manager it accepts the same layout kwargs as the standalone layout containers — layout=, gap=, fill_items=, expand_items=, anchor_items=, columns=, rows=, sticky_items=, auto_flow=.

property key: str#

The page’s unique key, used with PageStack.item() / navigate().

guide_layout(child, **layout_kw)#
navigate(data=None)#

Navigate to this page.

Parameters:

data (dict | None) – Optional data dict passed to the page’s mount event.