CheckButton
Bases: LocalizationMixin, SignalMixin, TextSignalMixin, IconMixin, TTKWrapperBase, WidgetCapabilitiesMixin, TtkStateMixin, Checkbutton
bootstack wrapper for ttk.Checkbutton with bootstyle and icon support.
value
property
writable
value: Any
Get or set the checkbutton's value.
__init__
__init__(
master: Master = None,
**kwargs: Unpack[CheckButtonKwargs],
) -> None
Create a themed bootstack Checkbutton.
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 toggles. |
image |
PhotoImage
|
Image to display. |
icon |
str | dict
|
Theme-aware icon spec handled by the style system. |
icon_only |
bool
|
If True, removes the additional padding reserved for text. |
compound |
str
|
Placement of the image relative to text. |
variable |
Variable
|
Linked variable controlling the on/off state. |
localize |
bool | Literal['auto']
|
Determines the widget's localization mode. |
signal |
Signal
|
Reactive Signal controlling the on/off state (auto-synced with variable). |
value |
Any
|
Initial state for the widget's associated variable (defaults to None when unset). |
onvalue |
Any
|
Value set in |
offvalue |
Any
|
Value set in |
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 |
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', 'round', 'square'. |
bootstyle |
str
|
DEPRECATED - Use |
surface |
str
|
Optional surface token; otherwise inherited. |
style_options |
dict
|
Optional dict forwarded to the style builder. |
get
get() -> Any
Return the current value of the checkbutton.
set
set(value: Any) -> None
Set the value of the checkbutton.