iwidgets::dialog(1)
π NAME π
iwidgets::dialog β bestie, this makes you a dialog widget. That's it, that's the whole job. (It's page one of the [incr Widgets] manual, section 1, so like... iwidgets::dialog(1), iykyk.)
β¨ SYNOPSIS β¨
iwidgets::dialog pathName ?options?
𧬠INHERITANCE π§¬
Okay so the family tree is giving β¨legacyβ¨ and it goes like this, no skipping generations:
itk::Toplevel β iwidgets::Shell β iwidgets::Dialogshell β iwidgets::Dialog
πΈ STANDARD OPTIONS πΈ
backgroundcursorforeground
See the "options" manual entry for the deets on those standard options. π
π¦ INHERITED OPTIONS π¦
These cuties came from the dialogshell manual entry:
buttonBoxPadXbuttonBoxPadYbuttonBoxPospadXpadYseparatorthickness
See the "dialogshell" manual entry for details on the above inherited options.
These came from the shell manual entry:
heightmastermodalitywidth
See the "shell" manual entry for details on the above inherited options.
And this one came from the Toplevel manual entry:
title
See the "Toplevel" manual entry for details on the above inherited options. π
π DESCRIPTION π
So iwidgets::dialog creates a dialog box that hands you standard buttons and a child site for use in derived classes. The buttons are ok, apply, cancel, and help. And because we're not savages, there are Methods and Options to configure the buttons and the box that holds them. π«Ά
π METHODS π
The iwidgets::dialog command creates a brand new Tcl command whose name is pathName. That command is your main character and you can use it to invoke a bunch of operations on the widget. The general form is:
pathName option ?arg arg ...?
option and the args decide exactly what the command does. And here's what's possible for dialog widgets: β¬οΈ
π INHERITED METHODS π
From the buttonbox manual entry:
addbuttonconfiguredefaulthideindexinsertinvokeshow
See the "buttonbox" manual entry for details on the above inherited methods.
This one's from the dialogshell manual entry:
childsite
See the "dialogshell" manual entry for details on the above inherited methods.
And these are from the shell manual entry:
activatecenterdeactivate
See the "shell" manual entry for details on the above inherited methods.
β WIDGET-SPECIFIC METHODS β
pathName cget optionβ returns the current value of the configuration option you passed asoption. Andoptioncan be literally any of the values that theiwidgets::dialogcommand accepts. No cap. π«pathName configure ?option? ?value option value ...?β query or modify the widget's configuration options.- If you specify no
option, you get back a list describing all the available options forpathName(seeTk_ConfigureInfofor how that list is formatted, bestie, I'm not typing that out). - If you specify an
optionwith novalue, the command returns a list describing that one named option β and that list will be identical to the corresponding sublist of the value you'd get back if you hadn't specified any option. Same list, different vibe. π - If you specify one or more
option-valuepairs, the command modifies the given widget option(s) to have the given value(s). And in that case? The command returns an empty string. That's it, that's the whole return. π«₯ - And yeah,
optionmay have any of the values accepted by theiwidgets::dialogcommand.
- If you specify no
π₯ EXAMPLE π₯
package require Iwidgets 4.0
iwidgets::dialog .d -modality global
.d buttonconfigure OK -command {puts OK; .d deactivate 1}
.d buttonconfigure Apply -command {puts Apply}
.d buttonconfigure Cancel -command {puts Cancel; .d deactivate 0}
.d buttonconfigure Help -command {puts Help}
listbox [.d childsite].lb -relief sunken
pack [.d childsite].lb -expand yes -fill both
if {[.d activate]} {
puts "Exit via OK button"
} else {
puts "Exit via Cancel button"
}
π AUTHOR π
Mark L. Ulferts and Bret A. Schuhmacher β absolute icons, we stan. π«Ά
π KEYWORDS π
dialog, dialogshell, shell, widget
β¨ that's the whole page bestie β¨ This one lives in the Tk source, it's iwidgets::dialog(1), and yeah, it's serving [incr Widgets] energy from start to finish. Go forth and build a dialog. 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