Skip to content

Combobox

Bases: TextSignalMixin, TTKWrapperBase, WidgetCapabilitiesMixin, TtkStateMixin, Combobox

bootstack wrapper for ttk.Combobox with bootstyle support.

__init__

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

Create a themed bootstack Combobox.

Parameters:

Name Type Description Default
master Master

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

None

Other Parameters:

Name Type Description
values list

Sequence of values to display.

textvariable Variable

Tk variable linked to the selected value.

textsignal Signal

Reactive Signal linked to the text (auto-synced with textvariable).

state str

Widget state; 'readonly' restricts to list items.

width int

Width in characters.

height int

Maximum rows shown in the drop-down list.

postcommand Callable

Callback executed before showing the drop-down.

justify str

Text justification within the entry field.

exportselection bool

Whether selection is exported to X clipboard.

xscrollcommand Callable

Scroll callback for horizontal scrolling.

font str | Font

Font for the entry field.

foreground str

Text color.

background str

Background color for the entry field.

style str

Explicit ttk style name (overrides accent/variant).

accent str

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

density str

The vertical and horizontal compactness, e.g. 'default', 'compact'.

bootstyle str

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

surface str

Optional surface token; otherwise inherited.

style_options dict

Optional dict forwarded to the style builder.