iwidgets::promptdialog(1)
π iwidgets::promptdialog β the manual page, but make it cute
okay bestie, welcome to iwidgets::promptdialog(1), part of the [incr Widgets] fam, living in section 1 of your man pages. this is the prompt dialog widget and she is literally the moment. let's get into it π«Ά
β¨ NAME β¨
iwidgets::promptdialog β create and manipulate a prompt dialog widget. yes that's the whole job and she does it flawlessly π
πΈ SYNOPSIS πΈ
iwidgets::promptdialog pathName ?options?
π¦ INHERITANCE π¦
the family tree is giving royal lineage, no cap:
itk::Toplevel <- iwidgets::Dialogshell <- iwidgets::Dialog <-
iwidgets::Promptdialog
so she inherits from itk::Toplevel, which feeds iwidgets::Dialogshell, which feeds iwidgets::Dialog, which feeds iwidgets::Promptdialog. a whole dynasty π
β STANDARD OPTIONS β
these are the classic ones everybody gets:
backgroundborderWidthcursorexportSelectionforegroundhighlightColorhighlightThicknessinsertBackgroundinsertBorderWidthinsertOffTimeinsertOnTimeinsertWidthreliefselectBackgroundselectBorderWidthselectForeground
see the options manual entry for the deets on all of the above standard options.
π ASSOCIATED OPTIONS π
this one comes straight from the entry widget:
show
see the entry widget manual entry for details on the above associated options.
these cuties come from entryfield:
invalidtextBackgroundtextFontvalidate
see the entryfield widget manual entry for details on the above associated options.
and these come from labeledwidget:
labelFontlabelPoslabelText
see the labeledwidget widget manual entry for details on the above associated options.
π INHERITED OPTIONS π
from dialogshell, we're borrowing:
buttonBoxPadXbuttonBoxPadYbuttonBoxPospadXpadYseparatorthickness
see the dialogshell widget manual entry for details on the above inherited options.
from shell:
heightmastermodalitywidth
see the shell widget manual entry for details on the above inherited options.
and from Toplevel:
title
see the Toplevel widget manual entry for details on the above inherited options.</purole>
π DESCRIPTION π
the iwidgets::promptdialog command creates a prompt dialog that's basically the OSF/Motif standard prompt dialog composite widget's spiritual twin. she's derived from the dialog class, and she's composed of an EntryField plus commands to manipulate the dialog buttons. it's giving "small widget, big responsibilities" π
β¨ METHODS β¨
the iwidgets::promptdialog command makes a brand new Tcl command whose name is pathName. you use that command to invoke all kinds of operations on the widget. the general form is:
pathName option ?arg arg ...?
Option and the args decide exactly what the command does. here's what's possible for promptdialog widgets:
π ASSOCIATED METHODS
from the entry widget, we've got:
deletegeticursorindexinsertscanselectionxview
see the entry widget manual entry for details on the above associated methods.
from entryfield:
clear
see the entryfield widget manual entry for details on the above associated methods.
π§ INHERITED METHODS
from buttonbox, serving us:
addbuttonconfiguredefaulthideinvokeshow
see the buttonbox widget manual entry for details on the above inherited methods.
from dialogshell:
childsite
see the dialogshell widget manual entry for details on the above inherited methods.
from shell:
activatecenterdeactivate
see the shell widget manual entry for details on the above inherited methods.
π WIDGET-SPECIFIC METHODS
pathName cget optionβ hands you the current value of the configuration option you named in option. Option can be literally any of the values theiwidgets::promptdialogcommand accepts. easy peasy.pathName configure ?option? ?value option value ...?β query or modify the widget's configuration options. if you pass no option at all, you get back a list describing every available option for pathName (peepTk_ConfigureInfofor how that list is formatted). if you pass an option with no value, 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. and if you pass one or more option-value pairs, the command modifies the given widget option(s) to have the given value(s), and in that case it returns an empty string. Option may have any of the values accepted by theiwidgets::promptdialogcommand. periodt.
πΈ COMPONENTS πΈ
- Name:
prompt - Class:
Entryfield
the prompt component is the entry field where the user types their input in the prompt dialog. see the entryfield widget manual entry for details on the prompt component item π
π₯ EXAMPLE π₯
here's the whole vibe in action, verbatim, no edits:
package require Iwidgets 4.0
option add *textBackground white
iwidgets::promptdialog .pd -modality global -title Password -labeltext
Password: -show *
.pd hide Apply
if {[.pd activate]} {
puts "Password entered: [.pd get]"
} else {
puts "Password prompt cancelled"
}
not her hiding the Apply button and gating the whole thing behind an if π iconic behaviour honestly.
π AUTHOR π
Mark L. Ulferts β thank you for your service, king π«Ά
β KEYWORDS β
promptdialog, dialog, dialogshell, shell, widget
and that's the whole page, bestie! this one's from the Tk corner of the world, filed under iwidgets::promptdialog(1) β go forth and prompt, you've got this π
β¨πΈ
π¦ 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