iwidgets::radiobox(1)
π iwidgets::radiobox β the manual page, but make it cute π
okay bestie, welcome to iwidgets::radiobox(1), part of [incr Widgets] β yes the manpage name is literally right there in the title, we love a self-aware icon π
β¨ NAME β¨
iwidgets::radiobox β create and manipulate a radiobox widget. that's it, that's the whole job, and it does it gorgeously π
πΈ SYNOPSIS πΈ
iwidgets::radiobox pathName ?options?
π¦ INHERITANCE π¦
the family tree, and it's giving royal bloodline π
itk::Widget <- iwidgets::Labeledframe <- iwidgets::Radiobox
π STANDARD OPTIONS π
these come with the standard-options package deal, no extra charge:
backgroundborderWidthcursordisabledForegroundforegroundreliefselectColor
heads up bestie β go read the "options" manual entry for the full tea on all of these β
π INHERITED OPTIONS π
these got passed down from the ancestors (the labeledframe class, to be exact):
labelBitmaplabelFontlabelImagelabelMarginlabelPoslabelTextlabelVariable
see the "labeledframe" class manual entry for the deets on these inherited ones π
π WIDGET-SPECIFIC OPTIONS π
these are the main-character options, the ones that make a radiobox a radiobox:
-commandβ Name:command, Class:Command, Command-Line Switch:-command
this is a Tcl command procedure that gets evaluated right after the current radio box selection changes. so like, the callback. the "and then what" β¨
-orientβ Name:orient, Class:Orient, Command-Line Switch:-orient, Default Value:vertical
controls the orientation of the radiobuttons inside the radiobox. valid values are either "horizontal" or "vertical". that's the whole vibe check, pick one π§
π DESCRIPTION π
the iwidgets::radiobox command creates a radio button box widget. and this widget is capable β it can add, insert, delete, select, and configure radiobuttons, and it can also hand you back the currently selected button. multitasking queen π«Ά
π« METHODS π«
so iwidgets::radiobox creates a brand new Tcl command, and its name is pathName. you use that command to invoke all kinds of operations on the widget. general form:
pathName option ?arg arg ...?
option and the args decide exactly what the command does. no cap.
a bunch of the widget commands for the radiobox take one argument that says which radiobutton of the radiobox we're operating on. these indicators are called indexes, and they let you reference and manipulate radiobuttons. radiobox indexes can be given in any of these forms:
numberβ specifies the radiobutton numerically, where0corresponds to the top radiobutton of the radiobox. zero-indexed, we respect that πendβ indicates the last radiobutton of the radiobox. iconic closer energy.patternβ if the index doesn't satisfy either of the forms above, then this form is used.patterngets pattern-matched against the tag of each radiobutton in the radiobox, in order from top to bottom, until a matching entry is found. the rules ofTcl_StringMatchare used. very detective, very slay π
π₯ WIDGET-SPECIFIC METHODS π₯
pathName add tag ?option value option value?β adds a new radiobutton to the radiobuttond window on the bottom. the command takes additional options which get passed on to the radiobutton as construction arguments β these include the standard Tk radiobutton options. thetagis returned. πpathName buttonconfigure index ?options?β this one is similar to theconfigurecommand, except it applies to the options for an individual radiobutton, whereasconfigureapplies to the options for the radiobox as a whole. options may have any of the values accepted by theaddwidget command. if options are specified, the options are modified as indicated in the command and the command returns an empty string. if no options are specified, it returns a list describing the current options for entryindex(seeTk_ConfigureInfofor info on the format of this list). πpathName cget optionβ returns the current value of the configuration option given byoption.optionmay have any of the values accepted by theiwidgets::radioboxcommand.pathName configure ?option? ?value option value ...?β query or modify the configuration options of the widget. if nooptionis specified, returns a list describing all of the available options forpathName(seeTk_ConfigureInfofor info on the format of this list). ifoptionis specified with novalue, then the command returns a list describing that one named option (this list will be identical to the corresponding sublist of the value returned if nooptionwas specified). if one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s) β in this case the command returns an empty string.optionmay have any of the values accepted by theiwidgets::radioboxcommand. πpathName delete indexβ deletes a specified radiobutton given an index. bye bestie πpathName deselect indexβ deselects a specified radiobutton given an index.pathName flash indexβ flashes a specified radiobutton given an index. dramatic on purpose β¨pathName getβ returns the tag of the currently selected radiobutton.pathName index indexβ returns the numerical index corresponding toindex.pathName insert index tag ?option value option value ...?β same as theaddcommand, except that it inserts the new radiobutton just before the one given byindex, instead of appending to the end of the radiobox. theoptionandvaluearguments have the same interpretation as for theaddwidget command.pathName select indexβ selects a specified radiobutton given an index. the chosen one. main character. π
π EXAMPLE π
here's the whole thing in action, and yes it eats:
package require Iwidgets 4.0
iwidgets::radiobox .rb -labeltext Fonts
.rb add times -text Times
.rb add helvetica -text Helvetica
.rb add courier -text Courier
.rb add symbol -text Symbol
.rb select courier
pack .rb -padx 10 -pady 10 -fill both -expand yes
look at courier getting selected at the end. taste. π
π AUTHOR π
- Michael J. McLennan
- Mark L. Ulferts
(legends, honestly π«Ά)
πΈ KEYWORDS πΈ
radiobox, widget
and that's the whole page bestie!! π this one lives under the Tk source, page iwidgets::radiobox(1) β so go forth, build your radioboxes, select things, flash things, and remember: zero is the top radiobutton, end is the last one, and patterns match tags from top to bottom. periodt. πβ¨π¦
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1995 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms