radiobox

An IWidget. Screenshot: https://web.archive.org/web/20190406020654/incrtcl.sourceforge.net/iwidgets/iwidgets/radiobox.gif

Docs can be found at http://incrtcl.sourceforge.net/iwidgets/iwidgets/radiobox.html and http://purl.org/tcl/home/man/iwidgets3.0/radiobox.n.html


RS: Although, with the modern labelframe, such a megawidget can easily be hand-rolled:

 proc radiobox {wpath args} {
    array set opt {-text "" -values ""}
    set opt(-variable) $wpath ;# default, if not specified
    array set opt $args
    labelframe $wpath -text $opt(-text)
    foreach value $opt(-values) {
        radiobutton $wpath.v$value -text $value -variable $opt(-variable)\
            -value $value
    }
    set ::$opt(-variable) [lindex $opt(-values) 0]
    eval pack [winfo children $wpath] -anchor w
    set wpath
 }

#----- Test:

 set fonts {Helvetica Courier Times Symbol}
 pack [radiobox .r -text "Select a font" -variable v -values $fonts]
 trace add variable v write  {wm title . $v;#} ;# to see that the variable changes

Category Command, a part of incr Widgets