| 1 |
<TITLE>promptdialog - Create and manipulate a prompt dialog widget</TITLE> |
| 2 |
<H1>promptdialog - Create and manipulate a prompt dialog widget</H1> |
| 3 |
|
| 4 |
</pre><H2>SYNOPSIS</H2> |
| 5 |
<B>promptdialog<I> <I>pathName </I>?<I>options</I>? |
| 6 |
</pre><H2>INHERITANCE</H2> |
| 7 |
itk::Toplevel <- dialogshell <- dialog <- promptdialog |
| 8 |
</pre><H2>STANDARD OPTIONS</H2> |
| 9 |
<P> |
| 10 |
<table cellpadding=5> |
| 11 |
<td valign=top> |
| 12 |
<B>background</B><br> |
| 13 |
<B>foreground</B><br> |
| 14 |
<B>insertBorderWidth</B><br> |
| 15 |
<B>relief</B><br> |
| 16 |
</td> |
| 17 |
<td valign=top> |
| 18 |
<B>borderWidth</B><br> |
| 19 |
<B>highlightColor</B><br> |
| 20 |
<B>insertOffTime</B><br> |
| 21 |
<B>selectBackground</B><br> |
| 22 |
</td> |
| 23 |
<td valign=top> |
| 24 |
<B>cursor</B><br> |
| 25 |
<B>highlightThickness</B><br> |
| 26 |
<B>insertOnTime</B><br> |
| 27 |
<B>selectBorderWidth</B><br> |
| 28 |
</td> |
| 29 |
<td valign=top> |
| 30 |
<B>exportSelection</B><br> |
| 31 |
<B>insertBackground</B><br> |
| 32 |
<B>insertWidth</B><br> |
| 33 |
<B>selectForeground</B><br> |
| 34 |
</td> |
| 35 |
</table> |
| 36 |
<P> |
| 37 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/options.n.html"> "options" </A> manual entry for details on the standard options. |
| 38 |
</pre><H2>ASSOCIATED OPTIONS</H2> |
| 39 |
<P> |
| 40 |
<table cellpadding=5> |
| 41 |
<td valign=top> |
| 42 |
<B>show</B><br> |
| 43 |
</td> |
| 44 |
<td valign=top> |
| 45 |
</td> |
| 46 |
<td valign=top> |
| 47 |
</td> |
| 48 |
<td valign=top> |
| 49 |
</td> |
| 50 |
</table> |
| 51 |
<P> |
| 52 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/entry.n.html"> "entry" </A> widget manual entry for details on the above |
| 53 |
associated options. |
| 54 |
<P> |
| 55 |
<table cellpadding=5> |
| 56 |
<td valign=top> |
| 57 |
<B>invalid</B><br> |
| 58 |
</td> |
| 59 |
<td valign=top> |
| 60 |
<B>textBackground</B><br> |
| 61 |
</td> |
| 62 |
<td valign=top> |
| 63 |
<B>textFont</B><br> |
| 64 |
</td> |
| 65 |
<td valign=top> |
| 66 |
<B>validate</B><br> |
| 67 |
</td> |
| 68 |
</table> |
| 69 |
<P> |
| 70 |
See the <A HREF="entryfield.n.html"> "entryfield" </A> widget manual entry for details on the above |
| 71 |
associated options. |
| 72 |
<P> |
| 73 |
<table cellpadding=5> |
| 74 |
<td valign=top> |
| 75 |
<B>labelFont</B><br> |
| 76 |
</td> |
| 77 |
<td valign=top> |
| 78 |
<B>labelPos</B><br> |
| 79 |
</td> |
| 80 |
<td valign=top> |
| 81 |
<B>labelText</B><br> |
| 82 |
</td> |
| 83 |
<td valign=top> |
| 84 |
</td> |
| 85 |
</table> |
| 86 |
<P> |
| 87 |
See the <A HREF="labeledwidget.n.html"> "labeledwidget" </A> widget manual entry for details on the above |
| 88 |
associated options. |
| 89 |
</pre><H2>INHERITED OPTIONS</H2> |
| 90 |
<P> |
| 91 |
<table cellpadding=5> |
| 92 |
<td valign=top> |
| 93 |
<B>buttonBoxPadX</B><br> |
| 94 |
<B>padY</B><br> |
| 95 |
</td> |
| 96 |
<td valign=top> |
| 97 |
<B>buttonBoxPadY</B><br> |
| 98 |
<B>separator</B><br> |
| 99 |
</td> |
| 100 |
<td valign=top> |
| 101 |
<B>buttonBoxPos</B><br> |
| 102 |
<B>thickness</B><br> |
| 103 |
</td> |
| 104 |
<td valign=top> |
| 105 |
<B>padX</B><br> |
| 106 |
</td> |
| 107 |
</table> |
| 108 |
<P> |
| 109 |
See the <A HREF="dialogshell.n.html"> "dialogshell" </A> widget manual entry for details on the above |
| 110 |
inherited options. |
| 111 |
<P> |
| 112 |
<table cellpadding=5> |
| 113 |
<td valign=top> |
| 114 |
<B>height</B><br> |
| 115 |
</td> |
| 116 |
<td valign=top> |
| 117 |
<B>master</B><br> |
| 118 |
</td> |
| 119 |
<td valign=top> |
| 120 |
<B>modality</B><br> |
| 121 |
</td> |
| 122 |
<td valign=top> |
| 123 |
<B>width</B><br> |
| 124 |
</td> |
| 125 |
</table> |
| 126 |
<P> |
| 127 |
See the "shell" widget manual entry for details on the above |
| 128 |
inherited options. |
| 129 |
<P> |
| 130 |
<table cellpadding=5> |
| 131 |
<td valign=top> |
| 132 |
<B>title</B><br> |
| 133 |
</td> |
| 134 |
<td valign=top> |
| 135 |
</td> |
| 136 |
<td valign=top> |
| 137 |
</td> |
| 138 |
<td valign=top> |
| 139 |
</td> |
| 140 |
</table> |
| 141 |
<P> |
| 142 |
See the "Toplevel" widget manual entry for details on the above |
| 143 |
inherited options. |
| 144 |
<P> |
| 145 |
</pre><HR> |
| 146 |
|
| 147 |
</pre><H2>DESCRIPTION</H2> |
| 148 |
<P> |
| 149 |
The <B>promptdialog</B> command creates a prompt dialog similar to the |
| 150 |
OSF/Motif standard prompt dialog composite widget. The promptdialog |
| 151 |
is derived from the dialog class and is composed of a EntryField |
| 152 |
with commands to manipulate the dialog buttons. |
| 153 |
|
| 154 |
</pre><H2>METHODS</H2> |
| 155 |
<P> |
| 156 |
The <B>promptdialog</B> command creates a new Tcl command whose |
| 157 |
name is <I>pathName</I>. This |
| 158 |
command may be used to invoke various |
| 159 |
operations on the widget. It has the following general form: |
| 160 |
<pre> |
| 161 |
<I>pathName option </I>?<I>arg arg ...</I>? |
| 162 |
</pre> |
| 163 |
<I>Option</I> and the <I>arg</I>s |
| 164 |
determine the exact behavior of the command. The following |
| 165 |
commands are possible for promptdialog widgets: |
| 166 |
</pre><H2>ASSOCIATED METHODS</H2> |
| 167 |
<P> |
| 168 |
<table cellpadding=5> |
| 169 |
<td valign=top> |
| 170 |
<B>delete</B><br> |
| 171 |
<B>insert</B><br> |
| 172 |
</td> |
| 173 |
<td valign=top> |
| 174 |
<B>get</B><br> |
| 175 |
<B>scan</B><br> |
| 176 |
</td> |
| 177 |
<td valign=top> |
| 178 |
<B>icursor</B><br> |
| 179 |
<B>selection</B><br> |
| 180 |
</td> |
| 181 |
<td valign=top> |
| 182 |
<B>index</B><br> |
| 183 |
<B>xview</B><br> |
| 184 |
</td> |
| 185 |
</table> |
| 186 |
<P> |
| 187 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/entry.n.html"> "entry" </A> widget manual entry for details on the above |
| 188 |
associated methods. |
| 189 |
<P> |
| 190 |
<table cellpadding=5> |
| 191 |
<td valign=top> |
| 192 |
<B>clear</B><br> |
| 193 |
</td> |
| 194 |
<td valign=top> |
| 195 |
</td> |
| 196 |
<td valign=top> |
| 197 |
</td> |
| 198 |
<td valign=top> |
| 199 |
</td> |
| 200 |
</table> |
| 201 |
<P> |
| 202 |
See the <A HREF="entryfield.n.html"> "entryfield" </A> widget manual entry for details on the above |
| 203 |
associated methods. |
| 204 |
</pre><H2>INHERITED METHODS</H2> |
| 205 |
<P> |
| 206 |
<table cellpadding=5> |
| 207 |
<td valign=top> |
| 208 |
<B>add</B><br> |
| 209 |
<B>invoke</B><br> |
| 210 |
</td> |
| 211 |
<td valign=top> |
| 212 |
<B>buttonconfigure</B><br> |
| 213 |
<B>show</B><br> |
| 214 |
</td> |
| 215 |
<td valign=top> |
| 216 |
<B>default</B><br> |
| 217 |
</td> |
| 218 |
<td valign=top> |
| 219 |
<B>hide</B><br> |
| 220 |
</td> |
| 221 |
</table> |
| 222 |
<P> |
| 223 |
See the <A HREF="buttonbox.n.html"> "buttonbox" </A> widget manual entry for details on the above |
| 224 |
inherited methods. |
| 225 |
<P> |
| 226 |
<table cellpadding=5> |
| 227 |
<td valign=top> |
| 228 |
<B>childsite</B><br> |
| 229 |
</td> |
| 230 |
<td valign=top> |
| 231 |
</td> |
| 232 |
<td valign=top> |
| 233 |
</td> |
| 234 |
<td valign=top> |
| 235 |
</td> |
| 236 |
</table> |
| 237 |
<P> |
| 238 |
See the <A HREF="dialogshell.n.html"> "dialogshell" </A> widget manual entry for details on the above |
| 239 |
inherited methods. |
| 240 |
<P> |
| 241 |
<table cellpadding=5> |
| 242 |
<td valign=top> |
| 243 |
<B>activate</B><br> |
| 244 |
</td> |
| 245 |
<td valign=top> |
| 246 |
<B>center</B><br> |
| 247 |
</td> |
| 248 |
<td valign=top> |
| 249 |
<B>deactivate</B><br> |
| 250 |
</td> |
| 251 |
<td valign=top> |
| 252 |
</td> |
| 253 |
</table> |
| 254 |
<P> |
| 255 |
See the "shell" widget manual entry for details on the above |
| 256 |
inherited methods. |
| 257 |
|
| 258 |
</pre><H2>WIDGET-SPECIFIC METHODS</H2> |
| 259 |
<DL> |
| 260 |
<DT> <I>pathName <B>cget</B> <I>option</I> |
| 261 |
</I></B> |
| 262 |
<DD> Returns the current value of the configuration option given |
| 263 |
by <I>option</I>. |
| 264 |
<I>Option</I> may have any of the values accepted by the <B>promptdialog</B> |
| 265 |
command. |
| 266 |
</DL> |
| 267 |
<DL> |
| 268 |
<DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>? |
| 269 |
</I></B> |
| 270 |
<DD> Query or modify the configuration options of the widget. |
| 271 |
If no <I>option</I> is specified, returns a list describing all of |
| 272 |
the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for |
| 273 |
information on the format of this list). If <I>option</I> is specified |
| 274 |
with no <I>value</I>, then the command returns a list describing the |
| 275 |
one named option (this list will be identical to the corresponding |
| 276 |
sublist of the value returned if no <I>option</I> is specified). If |
| 277 |
one or more <I>option-value</I> pairs are specified, then the command |
| 278 |
modifies the given widget option(s) to have the given value(s); in |
| 279 |
this case the command returns an empty string. |
| 280 |
<I>Option</I> may have any of the values accepted by the <B>promptdialog</B> |
| 281 |
command. |
| 282 |
|
| 283 |
</DL> |
| 284 |
</pre><H2>COMPONENTS</H2> |
| 285 |
<P> |
| 286 |
<pre> |
| 287 |
Name: <B>prompt</B> |
| 288 |
Class: <B>Entryfield</B> |
| 289 |
</pre> |
| 290 |
<UL> |
| 291 |
The prompt component is the entry field for user input in the prompt |
| 292 |
dialog. See the "entryfield" widget manual entry for details on |
| 293 |
the prompt component item. |
| 294 |
</UL> |
| 295 |
</table> |
| 296 |
|
| 297 |
</pre><H2>EXAMPLE</H2> |
| 298 |
<pre> |
| 299 |
option add *textBackground white |
| 300 |
|
| 301 |
promptdialog .pd -modality global -title Password -labeltext Password: -show * |
| 302 |
.pd hide Apply |
| 303 |
|
| 304 |
if {[.pd activate]} { |
| 305 |
puts "Password entered: [.pd get]" |
| 306 |
} else { |
| 307 |
puts "Password prompt cancelled" |
| 308 |
} |
| 309 |
</pre> |
| 310 |
</pre><H2>AUTHOR</H2> |
| 311 |
Mark L. Ulferts |
| 312 |
</pre><H2>KEYWORDS</H2> |
| 313 |
promptdialog, dialog, dialogshell, shell, widget |