1iwidgets::promptdialog  −  Create  and manipulate a prompt dialog
2widget iwidgets::promptdialog pathName  ?options?   itk::Toplevel
3<‐ iwidgets::Dialogshell <‐ iwidgets::Dialog <‐ iwidgets::Prompt‐
4dialog

background borderWidth cursor exportSelection

foreground highlightColor highlightThickness insertBackground

insertBorderWidth insertOffTime insertOnTime insertWidth

relief selectBackground selectBorderWidth selectForeground

9See the "options" manual entry for details on  the  standard  op‐
10tions.

show

12See  the "entry" widget manual entry for details on the above as‐
13sociated options.

invalid textBackground textFont validate

15See the "entryfield" widget manual entry for details on the above
16associated options.

labelFont labelPos labelText

18See  the  "labeledwidget"  widget manual entry for details on the
19above associated options.

buttonBoxPadX buttonBoxPadY buttonBoxPos padX

padY separator thickness

22See the "dialogshell" widget manual  entry  for  details  on  the
23above inherited options.

height master modality width

25See  the "shell" widget manual entry for details on the above in‐
26herited options.

title

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:

pathName option ?arg arg ...? Option and the args determine the

40exact behavior of the command.  The following commands are possi‐
41ble for promptdialog widgets:

delete get icursor index

insert scan selection xview

44See  the "entry" widget manual entry for details on the above as‐
45sociated methods.

clear

47See the "entryfield" widget manual entry for details on the above
48associated methods.

add buttonconfigure defaulthide

invoke show

51See  the "buttonbox" widget manual entry for details on the above
52inherited methods.

childsite

54See the "dialogshell" widget manual  entry  for  details  on  the
55above inherited methods.

activate center deactivate

57See  the "shell" widget manual entry for details on the above in‐
58herited methods.
59

pathName cget option Returns the current value of the configura‐

61tion  option  given by option.  Option may have any of the values
62accepted by the iwidgets::promptdialog command.  pathName config‐

ure ?option? ?value option value ...? Query or modify the con‐

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

iwidgets::promptdialog command.

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
Impressum