1iwidgets::promptdialog − Create and manipulate a prompt dialog
2widget iwidgets::promptdialog pathName ?options? itk::Toplevel
3<‐ iwidgets::Dialogshell <‐ iwidgets::Dialog <‐ iwidgets::Prompt‐
4dialog
9See the "options" manual entry for details on the standard op‐
10tions.
12See the "entry" widget manual entry for details on the above as‐
13sociated options.
15See the "entryfield" widget manual entry for details on the above
16associated options.
18See the "labeledwidget" widget manual entry for details on the
19above associated options.
22See the "dialogshell" widget manual entry for details on the
23above inherited options.
25See the "shell" widget manual entry for details on the above in‐
26herited options.
28See the "Toplevel" widget manual entry for details on the above
29inherited options.
30
31The iwidgets::promptdialog command creates a prompt dialog simi‐
32lar to the OSF/Motif standard prompt dialog composite widget.
33The promptdialog is derived from the dialog class and is composed
34of a EntryField with commands to manipulate the dialog buttons.
35
36The iwidgets::promptdialog command creates a new Tcl command
37whose name is pathName. This command may be used to invoke vari‐
38ous operations on the widget. It has the following general form:
40exact behavior of the command. The following commands are possi‐
41ble for promptdialog widgets:
44See the "entry" widget manual entry for details on the above as‐
45sociated methods.
47See the "entryfield" widget manual entry for details on the above
48associated methods.
51See the "buttonbox" widget manual entry for details on the above
52inherited methods.
54See the "dialogshell" widget manual entry for details on the
55above inherited methods.
57See the "shell" widget manual entry for details on the above in‐
58herited methods.
59
61tion option given by option. Option may have any of the values
62accepted by the iwidgets::promptdialog command. pathName config‐
64figuration options of the widget. If no option is specified, re‐
65turns a list describing all of the available options for pathName
66(see Tk_ConfigureInfo for information on the format of this
67list). If option is specified with no value, then the command
68returns a list describing the one named option (this list will be
69identical to the corresponding sublist of the value returned if
70no option is specified). If one or more option−value pairs are
71specified, then the command modifies the given widget option(s)
72to have the given value(s); in this case the command returns an
73empty string. Option may have any of the values accepted by the
75
76Name: prompt
77Class: Entryfield
78The prompt component is the entry field for user input in the
79prompt dialog. See the "entryfield" widget manual entry for de‐
80tails on the prompt component item.
81
82 package require Iwidgets 4.0
83 option add *textBackground white
84
85 iwidgets::promptdialog .pd ‐modality global ‐title Password ‐la‐
86beltext Password: ‐show *
87 .pd hide Apply
88
89 if {[.pd activate]} {
90 puts "Password entered: [.pd get]"
91 } else {
92 puts "Password prompt cancelled"
93 } Mark L. Ulferts promptdialog, dialog, dialogshell, shell, wid‐
94get
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132