Skip to content

RadioButton

Bases: LocalizationMixin, SignalMixin, TextSignalMixin, IconMixin, TTKWrapperBase, WidgetCapabilitiesMixin, TtkStateMixin, Radiobutton

bootstack wrapper for ttk.Radiobutton with bootstyle and icon support.

value property writable

value: Any

Get or set the radiobutton's selected value.

__init__

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

Create a themed bootstack Radiobutton.

Parameters:

Name Type Description Default
master Master

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

None

Other Parameters:

Name Type Description
text str

Text to display.

textvariable Variable

Tk variable linked to the text.

textsignal Signal[str]

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

command Callable

Callable invoked when the value is selected.

image PhotoImage

Image to display.

icon str | dict

Theme-aware icon spec handled by the style system.

icon_only bool

Removes the additional padding added for label.

compound str

Placement of the image relative to text.

variable Variable

Linked Tk variable that receives the selected value.

signal Signal

Reactive Signal that receives the selected value (auto-synced with variable).

value Any

The value assigned to variable when this radio is selected.

padding int | tuple

Extra space around the content.

anchor str

Determines how the content is aligned in the container. Combination of 'n', 's', 'e', 'w', or 'center' (default).

width int

Width of the control in characters.

underline int

Index of character to underline in text.

state str

Widget state.

takefocus bool

Whether the widget participates in focus traversal.

style str

Explicit ttk style name (overrides accent/variant).

accent str

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

variant str

Style variant, e.g. 'default'.

bootstyle str

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

surface str

Optional surface token; otherwise inherited.

style_options dict

Optional dict forwarded to the style builder.

localize bool | Literal['auto']

Determines the widget's localization mode.

get

get() -> Any

Return the current selected value.

set

set(value: Any) -> None

Set the selected value.