iwidgets::pushbutton(1)
π iwidgets::pushbutton β the manual page, but make it make sense π
okay bestie, welcome to iwidgets::pushbutton(1), the incr Widgets manual entry. yes it's a manual page. no it does not have to be boring. let's go π«Ά
β¨ NAME β¨
iwidgets::pushbutton β bestie, it creates and manipulates a push button widget. that's the whole vibe. a button. you push it. iconic.
β¨ SYNOPSIS β¨
iwidgets::pushbutton pathName ?options?
like. that's it. that's the whole summoning ritual π―οΈ
π¦ INHERITANCE π¦
itk::Widget <- iwidgets::Pushbutton
so it inherits from itk::Widget β it's giving nepo baby but in a cute way, it earned it π
π STANDARD OPTIONS π
these are the options it got from the family. all of them. every single one, no skips:
activeBackgroundactiveForegroundbackgroundbitmapborderWidthcommandcursordisabledForegroundfontforegroundhighlightBackgroundhighlightColorhighlightThicknessimagepadXpadYstatetextunderlinewrapLength
fr fr, if you wanna know what any of these do, go read the options manual entry. it's all in there, i'm not retyping the whole thing, that's a them problem.
π WIDGET-SPECIFIC OPTIONS π
these ones are hers. her own little options. obsessed.
- Name:
defaultRingΒ· Class:DefaultRingΒ· Command-Line Switch:-defaultring
a Boolean (any form Tcl_GetBoolean will accept, bestie) that says whether the button shows its default ring or not. the default is false. so like, off unless you ask. respect.
- Name:
defaultRingPadΒ· Class:PadΒ· Command-Line Switch:-defaultringpad
how much space gets allocated to the indentation of the default ring β given in any of the forms acceptable to Tcl_GetPixels. heads up tho: this option does literally nothing if defaultring is set to false. the default is 2 pixels.
- Name:
heightΒ· Class:HeightΒ· Command-Line Switch:-height
the height of the button, inclusive of any default ring, in any form acceptable to Tk_GetPixels. and if you set it to 0? the push button decides the height itself based on the requested height plus highlightring and defaultringpad. she's autonomous. let her cook π₯
- Name:
widthΒ· Class:WidthΒ· Command-Line Switch:-width
same energy, but sideways: the width of the button, inclusive of any default ring, any form Tk_GetPixels likes. set it to 0 and the push button figures the width out from the requested width plus highlightring and defaultringpad. queen behavior π
πΈ DESCRIPTION πΈ
the iwidgets::pushbutton command creates a push button with an optional default ring that's used for default designation and traversal. that ring? it's the little "hey, i'm the default one" moment. main character energy for real.
π METHODS π
so the iwidgets::pushbutton command makes a brand new Tcl command, and its name is pathName. you use that command to do stuff to the widget. general form goes like this:
pathName option ?arg arg ...?
option and the args decide exactly what happens. these are the commands you can run on pushbutton widgets:
π§ ASSOCIATED METHODS π§
flashinvoke
and for the deets on those, go check the button manual entry. iykyk π«Ά
β WIDGET-SPECIFIC METHODS β
pathName cget option
hands you back the current value of whatever configuration option you named in option. and option can be literally any of the values the iwidgets::pushbutton command accepts. easy.
pathName configure ?option? ?value option value ...?
query or modify the widget's configuration options, your call. the tea:
- no
optionat all? you get a list describing all the available options forpathName. (peepTk_ConfigureInfoif you wanna know the format of that list, bestie.) optionwith novalue? you get a list describing just that one named option. and it'll be identical to the matching sublist of the value you'd get with no option specified. consistent. we love that.- one or more
option-valuepairs? the command modifies the given widget option(s) to have the given value(s), and in that case it returns an empty string. that's it, that's the whole return. - and again,
optioncan be any of the values theiwidgets::pushbuttoncommand accepts.
π COMPONENTS π
- Name:
pushbuttonΒ· Class:Button
this component is the button, surrounded by the optional default ring. that's the whole thing. for the details on the pushbutton component item, go read the button widget manual entry. i'm not gatekeeping, i'm just pointing you to the source π«Ά
π₯ EXAMPLE π₯
here's the moment you've been waiting for:
package require Iwidgets 4.0 iwidgets::pushbutton .pb -text "Hello"
-command {puts "Hello World"} -defaultring 1 pack .pb -padx 10 -pady 10
it makes a button that says Hello, and when you push it, it puts "Hello World". and it's got the default ring. slay.
π AUTHOR π
Bret A. Schuhmacher Mark L. Ulferts
π KEYWORDS π
pushbutton, widget
okay that's the whole page bestie, you're now fluent in pushbutton. go push something. π
and a lil sign-off for the very end: this page lives under the Tk source, and it's iwidgets::pushbutton(1) β that's the manual, that's the section, that's the whole flex. mwah πβ¨
π¦ 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