Skip to content

Combobox

This widget style features a input box with a styled border and arrow. The border color is muted by default and changes to primary or the selected color on hover. The border increases in thickness on focus. The arrow color changes to the default or selected color on hover or on focus.

This widget also supports special styles for disabled state, readonly state, and invalid state.

combobox

# default combobox style
Combobox()

# danger colored combobox style
Combobox(bootstyle="danger")

Other combobox styles

Disabled combobox

This style cannot be applied via keywords; it is configured through widget settings.

# create the combobox in a disabled state
Combobox(state="disabled")

# disable a combobox after creation
cb = Combobox()
cb.configure(state="disabled")

Readonly combobox

This style cannot be applied via keywords; it is configured through widget settings.

# create the combobox in a readonly state
Combobox(state="readonly")

# set the combobox readonly state after creation
cb = Combobox()
cb.configure(state="readonly")

Invalid combobox

This style cannot be applied via keywords, but rather is the result of a validation process implemented on the widget. In the Cookbook you will find an example of how to apply validation to an Entry based widget.