ttk::radiobutton(n)
β¨ NAME β¨
okay so this is the ttk::radiobutton(n) page β Tk Themed Widget energy β and itβs all about a mutually exclusive option widget. bestie, itβs giving βpick one, not all of themβ ππ
πΈ SYNOPSIS πΈ
ttk::radiobutton pathName ?options?
π DESCRIPTION π
ttk::radiobutton widgets are used in groups to show or change a set of mutually-exclusive options. Radiobuttons are linked to a Tcl variable, and have an associated value; when a radiobutton is clicked, it sets the variable to its associated value. thatβs the whole vibe: click one, variable updates, group stays mutually exclusive. β¨
π STANDARD OPTIONS π
the standard-options crew is:
-class-compound-cursor-image-state-style-takefocus-text-textvariable-underline-width
see the ttk_widget manual entry for details on the standard options. π«Ά
π¦ WIDGET-SPECIFIC OPTIONS π¦
-commandβ Command-Line Name:-command; Database Name:command; Database Class:Command. A Tcl script to evaluate whenever the widget is invoked. π₯-valueβ Command-Line Name:-value; Database Name:Value; Database Class:Value. The value to store in the associated-variablewhen the widget is selected. π-variableβ Command-Line Name:-variable; Database Name:variable; Database Class:Variable. The name of a global variable whose value is linked to the widget. Default value is::selectedButton. π
π WIDGET COMMAND π
in addition to the standard cget, configure, identify element, instate, state, and style commands (see ttk::widget), radiobutton widgets support this extra command:
pathname invokeβ sets the-variableto the-value, selects the widget, and evaluates the associated-command. Returns the result of the-command, or the empty string if no-commandis specified. slay, thatβs the whole command. β¨
β WIDGET STATES β
the widget does not respond to user input if the disabled state is set.
the widget sets the selected state whenever the linked -variable is set to the widgetβs -value, and clears it otherwise.
the widget sets the alternate state whenever the linked -variable is unset. (the alternate state may be used to indicate a βtri-stateβ or βindeterminateβ selection.) π
π§ STANDARD STYLES π§
Ttk::radiobutton widgets support the Toolbutton style in all standard themes, which is useful for creating widgets for toolbars. toolbar besties, this oneβs for you. π οΈ
π STYLING OPTIONS π
the class name for a ttk::radiobutton is TRadiobutton.
dynamic states: active, alternate, disabled, pressed, readonly, selected.
TRadiobutton styling options configurable with ttk::style are:
-backgroundcolor-compoundcompound-foregroundcolor-indicatorbackgroundcolor-indicatorcolorcolor-indicatormarginpadding-indicatorreliefrelief-paddingpadding
some options are only available for specific themes. iykyk, theme-dependent behavior is real.
see the ttk::style manual page for information on how to configure ttk styles. π¨
π SEE ALSO π
ttk::widget(n)ttk::checkbutton(n)radiobutton(n)
π KEYWORDS π
widget, button, option
π footer sign-off, bestie: source/version is Tk 8.5, manual is ttk::radiobutton(n), and the footer date slot isnβt listed in the original β so weβre not making one up, periodt. π
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 2004 Joe English
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms