1 |
578 |
markom |
<HTML>
|
2 |
|
|
<HEAD>
|
3 |
|
|
<TITLE>iwidgets2.2.0 User Commands - promptdialog</TITLE>
|
4 |
|
|
</HEAD>
|
5 |
|
|
<BODY BGCOLOR="#FFFFFF">
|
6 |
|
|
<H1>iwidgets2.2.0 User Commands - promptdialog</H1>
|
7 |
|
|
<HR>
|
8 |
|
|
<PRE>
|
9 |
|
|
|
10 |
|
|
</PRE>
|
11 |
|
|
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
</PRE>
|
15 |
|
|
<H2>NAME</H2><PRE>
|
16 |
|
|
promptdialog - Create and manipulate a prompt dialog widget
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
</PRE>
|
20 |
|
|
<H2>SYNOPSIS</H2><PRE>
|
21 |
|
|
<STRONG>promptdialog</STRONG> <EM>pathName</EM> ?<EM>options</EM>?
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
</PRE>
|
25 |
|
|
<H2>INHERITANCE</H2><PRE>
|
26 |
|
|
itk::Toplevel <- dialogshell <- dialog <- promptdialog
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
</PRE>
|
30 |
|
|
<H2>STANDARD OPTIONS</H2><PRE>
|
31 |
|
|
<STRONG>background</STRONG> <STRONG>borderWidth</STRONG> <STRONG>cursor</STRONG> <STRONG>exportSelection</STRONG>
|
32 |
|
|
<STRONG>foreground</STRONG> <STRONG>highlightColor</STRONG> <STRONG>highlightThicknessinsertBackground</STRONG>
|
33 |
|
|
<STRONG>insertBorderWidth</STRONG> <STRONG>insertOffTime</STRONG> <STRONG>insertOnTimeinsertWidth</STRONG>
|
34 |
|
|
<STRONG>justify</STRONG> <STRONG>relief</STRONG> <STRONG>selectBackgroundselectBorderWidth</STRONG>
|
35 |
|
|
<STRONG>selectForeground</STRONG> <STRONG>textVariable</STRONG>
|
36 |
|
|
|
37 |
|
|
See the "options" manual entry for details on the standard
|
38 |
|
|
options.
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
</PRE>
|
42 |
|
|
<H2>ASSOCIATED OPTIONS</H2><PRE>
|
43 |
|
|
<STRONG>show</STRONG> <STRONG>state</STRONG> <STRONG>width</STRONG>
|
44 |
|
|
|
45 |
|
|
See the "entry" widget manual entry for details on the above
|
46 |
|
|
associated options.
|
47 |
|
|
|
48 |
|
|
<STRONG>childSitePos</STRONG> <STRONG>fixed</STRONG> <STRONG>invalid</STRONG> <STRONG>textBackground</STRONG>
|
49 |
|
|
<STRONG>textFont</STRONG> <STRONG>validate</STRONG>
|
50 |
|
|
|
51 |
|
|
See the "entryfield" widget manual entry for details on the
|
52 |
|
|
above associated options.
|
53 |
|
|
|
54 |
|
|
<STRONG>labelBitmap</STRONG> <STRONG>labelFont</STRONG> <STRONG>labelImage</STRONG> <STRONG>labelMargin</STRONG>
|
55 |
|
|
o<STRONG>labelPos</STRONG> <STRONG>labelText</STRONG>
|
56 |
|
|
|
57 |
|
|
See the "labeledwidget" widget manual entry for details on
|
58 |
|
|
the above associated options.
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
</PRE>
|
62 |
|
|
<H2>INHERITED OPTIONS</H2><PRE>
|
63 |
|
|
<STRONG>buttonBoxPadX</STRONG> <STRONG>buttonBoxPadY</STRONG> <STRONG>buttonBoxPos</STRONG> <STRONG>padX</STRONG>
|
64 |
|
|
<STRONG>padY</STRONG> <STRONG>separator</STRONG> <STRONG>thickness</STRONG>
|
65 |
|
|
|
66 |
|
|
See the "dialogshell" widget manual entry for details on the
|
67 |
|
|
above inherited options.
|
68 |
|
|
|
69 |
|
|
<STRONG>master</STRONG> <STRONG>modality</STRONG> <STRONG>title</STRONG>
|
70 |
|
|
|
71 |
|
|
See the "shell" widget manual entry for details on the above
|
72 |
|
|
inherited options.
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
</PRE>
|
77 |
|
|
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
</PRE>
|
82 |
|
|
<H2>DESCRIPTION</H2><PRE>
|
83 |
|
|
The <STRONG>promptdialog</STRONG> command creates a prompt dialog similar to
|
84 |
|
|
the OSF/Motif standard prompt dialog composite widget. The
|
85 |
|
|
promptdialog is derived from the dialog class and is com-
|
86 |
|
|
posed of a EntryField with commands to manipulate the dialog
|
87 |
|
|
buttons.
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
</PRE>
|
92 |
|
|
<H2>METHODS</H2><PRE>
|
93 |
|
|
The <STRONG>promptdialog</STRONG> command creates a new Tcl command whose
|
94 |
|
|
name is <EM>pathName</EM>. This command may be used to invoke vari-
|
95 |
|
|
ous operations on the widget. It has the following general
|
96 |
|
|
form:
|
97 |
|
|
|
98 |
|
|
<EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?
|
99 |
|
|
|
100 |
|
|
<EM>Option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
|
101 |
|
|
mand. The following commands are possible for promptdialog
|
102 |
|
|
widgets:
|
103 |
|
|
|
104 |
|
|
|
105 |
|
|
</PRE>
|
106 |
|
|
<H2>ASSOCIATED METHODS</H2><PRE>
|
107 |
|
|
<STRONG>delete</STRONG> <STRONG>get</STRONG> <STRONG>icursor</STRONG> <STRONG>index</STRONG>
|
108 |
|
|
<STRONG>insert</STRONG> <STRONG>scan</STRONG> <STRONG>selection</STRONG> <STRONG>xview</STRONG>
|
109 |
|
|
|
110 |
|
|
See the "entry" widget manual entry for details on the above
|
111 |
|
|
associated methods.
|
112 |
|
|
|
113 |
|
|
<STRONG>clear</STRONG>
|
114 |
|
|
|
115 |
|
|
See the "entryfield" widget manual entry for details on the
|
116 |
|
|
above associated methods.
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
</PRE>
|
120 |
|
|
<H2>INHERITED METHODS</H2><PRE>
|
121 |
|
|
<STRONG>add</STRONG> <STRONG>buttonconfigure</STRONG> <STRONG>defaulthide</STRONG>
|
122 |
|
|
<STRONG>invoke</STRONG> <STRONG>show</STRONG>
|
123 |
|
|
|
124 |
|
|
See the "buttonbox" widget manual entry for details on the
|
125 |
|
|
above inherited methods.
|
126 |
|
|
|
127 |
|
|
<STRONG>childsite</STRONG>
|
128 |
|
|
|
129 |
|
|
See the "dialogshell" widget manual entry for details on the
|
130 |
|
|
above inherited methods.
|
131 |
|
|
|
132 |
|
|
<STRONG>activate</STRONG> <STRONG>center</STRONG> <STRONG>deactivate</STRONG>
|
133 |
|
|
|
134 |
|
|
See the "shell" widget manual entry for details on the above
|
135 |
|
|
inherited methods.
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
</PRE>
|
139 |
|
|
<H2>WIDGET-SPECIFIC METHODS</H2><PRE>
|
140 |
|
|
<EM>pathName</EM> <STRONG>cget</STRONG> <EM>option</EM>
|
141 |
|
|
Returns the current value of the configuration option
|
142 |
|
|
given by <EM>option</EM>. <EM>Option</EM> may have any of the values
|
143 |
|
|
accepted by the <STRONG>promptdialog</STRONG> command.
|
144 |
|
|
|
145 |
|
|
<EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
|
146 |
|
|
Query or modify the configuration options of the
|
147 |
|
|
widget. If no <EM>option</EM> is specified, returns a list
|
148 |
|
|
describing all of the available options for <EM>pathName</EM>
|
149 |
|
|
(see <STRONG>Tk_ConfigureInfo</STRONG> for information on the format of
|
150 |
|
|
this list). If <EM>option</EM> is specified with no <EM>value</EM>, then
|
151 |
|
|
the command returns a list describing the one named
|
152 |
|
|
option (this list will be identical to the correspond-
|
153 |
|
|
ing sublist of the value returned if no <EM>option</EM> is
|
154 |
|
|
specified). If one or more <EM>option</EM> - <EM>value</EM> pairs are
|
155 |
|
|
specified, then the command modifies the given widget
|
156 |
|
|
option(s) to have the given value(s); in this case the
|
157 |
|
|
command returns an empty string. <EM>Option</EM> may have any
|
158 |
|
|
of the values accepted by the <STRONG>promptdialog</STRONG> command.
|
159 |
|
|
|
160 |
|
|
|
161 |
|
|
|
162 |
|
|
</PRE>
|
163 |
|
|
<H2>COMPONENTS</H2><PRE>
|
164 |
|
|
Name: <STRONG>ef</STRONG>
|
165 |
|
|
Class: <STRONG>Entryfield</STRONG>
|
166 |
|
|
|
167 |
|
|
The ef component is the entry field for user input in
|
168 |
|
|
the prompt dialog. See the "entryfield" widget manual
|
169 |
|
|
entry for details on the ef component item.
|
170 |
|
|
|
171 |
|
|
|
172 |
|
|
|
173 |
|
|
</PRE>
|
174 |
|
|
<H2>EXAMPLE</H2><PRE>
|
175 |
|
|
option add *textBackground white
|
176 |
|
|
|
177 |
|
|
promptdialog .pd -modality global -title Password -labeltext Password: -show *
|
178 |
|
|
.pd buttonconfigure OK -command {.pd deactivate 1}
|
179 |
|
|
.pd hide Apply
|
180 |
|
|
.pd buttonconfigure Cancel -command {.pd deactivate 0}
|
181 |
|
|
.pd hide Help
|
182 |
|
|
|
183 |
|
|
if {[.pd activate]} {
|
184 |
|
|
puts "Password entered: [.pd get]"
|
185 |
|
|
} else {
|
186 |
|
|
puts "Password prompt cancelled"
|
187 |
|
|
}
|
188 |
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
|
|
</PRE>
|
192 |
|
|
<H2>AUTHOR</H2><PRE>
|
193 |
|
|
Mark L. Ulferts
|
194 |
|
|
|
195 |
|
|
|
196 |
|
|
</PRE>
|
197 |
|
|
<H2>KEYWORDS</H2><PRE>
|
198 |
|
|
promptdialog, dialog, dialogshell, shell, widget
|
199 |
|
|
</PRE>
|
200 |
|
|
</BODY>
|
201 |
|
|
</HTML>
|