Skip to content

Frame

Bases: TTKWrapperBase, WidgetCapabilitiesMixin, TtkStateMixin, Frame

bootstack wrapper for ttk.Frame with bootstyle support.

__init__

__init__(
    master: Master = None, **kwargs: Unpack[FrameKwargs]
) -> None

Create a themed bootstack Frame.

Parameters:

Name Type Description Default
master Master

Parent widget. If None, uses the default root window.

None

Other Parameters:

Name Type Description
padding int | tuple

Extra padding inside the frame.

relief str

Border style.

borderwidth int

Border width.

width int

Requested width in pixels.

height int

Requested height in pixels.

takefocus bool

Widget accepts focus during keyboard traversal.

style str

Explicit ttk style name (overrides accent/variant).

accent str

Accent token for styling, e.g. 'primary', 'secondary', 'success'.

variant str

Style variant (if applicable).

bootstyle str

DEPRECATED - Use accent and variant instead. Combined style tokens (e.g., 'secondary').

surface str

Optional surface token; otherwise inherited.

input_background str

Surface token used as the fill color for all input widgets (Entry, Combobox, Spinbox, Field) inside this container. Cascades to descendants the same way surface does. Input foreground, border, and focus-ring colors are all derived from this fill so contrast is always correct. Defaults to 'content' (the app background), which keeps inputs visually distinct regardless of the container surface. Override with any surface token (e.g. 'card') to match the container.

show_border bool

Draw a border around the frame.

style_options dict

Optional dict forwarded to the style builder.

configure_style_options

configure_style_options(value=None, **kwargs)

Set style options and refresh descendant surfaces if needed.