forked from angal/arcadia
/
Entry.html
341 lines (311 loc) · 11.9 KB
/
Entry.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<HTML>
<HEAD><TITLE>Entry</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Entry</B>
- Entry widget with <B>state</B> option, dynamic help and drag and drop facilities
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Entry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-disabledbackground">-disabledbackground</A></TD>
<TD> <A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-exportselection">-exportselection</A></TD>
<TD> <A HREF="options.htm#M-font">-font</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD> <A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TD>
<TD> <A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-insertbackground">-insertbackground</A></TD>
<TD> <A HREF="options.htm#M-insertborderwidth">-insertborderwidth</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-insertofftime">-insertofftime</A></TD>
<TD> <A HREF="options.htm#M-insertontime">-insertontime</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-insertwidth">-insertwidth</A></TD>
<TD> <A HREF="options.htm#M-justify">-justify</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-relief">-relief</A></TD>
<TD> <A HREF="options.htm#M-selectbackground">-selectbackground</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-selectborderwidth">-selectborderwidth</A></TD>
<TD> <A HREF="options.htm#M-selectforeground">-selectforeground</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TD>
<TD> <A HREF="options.htm#M-text">-text</A></TD>
</TR>
<TR>
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TD>
<TD> <A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD> <A HREF="#-command">-command</A></TD>
<TD> <A HREF="#-dragenabled">-dragenabled</A></TD>
</TR>
<TR>
<TD> <A HREF="#-dragendcmd">-dragendcmd</A></TD>
<TD> <A HREF="#-dragevent">-dragevent</A></TD>
</TR>
<TR>
<TD> <A HREF="#-draginitcmd">-draginitcmd</A></TD>
<TD> <A HREF="#-dragtype">-dragtype</A></TD>
</TR>
<TR>
<TD> <A HREF="#-dropcmd">-dropcmd</A></TD>
<TD> <A HREF="#-dropenabled">-dropenabled</A></TD>
</TR>
<TR>
<TD> <A HREF="#-dropovercmd">-dropovercmd</A></TD>
<TD> <A HREF="#-droptypes">-droptypes</A></TD>
</TR>
<TR>
<TD> <A HREF="#-editable">-editable</A></TD>
<TD> <A HREF="#-helptext">-helptext</A></TD>
</TR>
<TR>
<TD> <A HREF="#-helptype">-helptype</A></TD>
<TD> <A HREF="#-helpvar">-helpvar</A></TD>
</TR>
<TR>
<TD> <A HREF="#-show">-show</A></TD>
<TD> <A HREF="#-state">-state</A></TD>
</TR>
<TR>
<TD> <A HREF="#-width">-width</A></TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
The <B>Entry</B> widget extends the default Tk entry. Options have been added to provide
visual effect depending on the state of the Entry,
<A HREF="DynamicHelp.html">DynamicHelp</A> options,
and <A HREF="DragSite.html">Drag</A> and
<A HREF="DropSite.html">Drop</A>.
Entry behaves much like a Label, with <B>text</B> option to set its contents.
<BR>Tk entry command can also be used on Entry widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command when user press <Return> in the Entry.
</DD>
</DL>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>If <B>dragendcmd</B> is empty, the internal <I>dragend</I> command updates the entry
following the operation (<B>move</B> or <B>copy</B>) and the dragged data
(whole or selected part of the entry).
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Specifies a command to be called when <B>dragevent</B> occurs on widget.
<B>draginitcmd</B> must be a command conforming to the description of the
option <B>draginitcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>if <B>draginitcmd</B> is empty, the command refuse the drag if entry is empty or if
portion of text is selected and event doesn't occur above the selection. In all other cases,
the command returns:
<UL>
<LI>as the data type, the value of option <B>dragtype</B> or <I>TEXT</I> if empty,
<LI>as the operations, <I>{copy move}</I> if <B>state</B> is normal and <B>editable</B>
is true, or <I>{copy}</I> only in other cases,
<LI>as the data, the whole content or the selected portion of the entry.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
Entry has a command wrapper for <I>drop</I> events. This command stops auto scrolling
and extract current position.
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the Entry,
<LI>the pathname of the drag source,
<LI>the numeric index in the entry designated by the cursor,
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
and must return a value conforming to <B>dropcmd</B> option described in
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
If <B>dropcmd</B> is empty, the wrapper updates the entry following the type of data:
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>COLOR</I> or <I>FGCOLOR</I></TD>
<TD>reconfigure the <B>foreground</B> of the Entry</TD>
<TR><TD><I>BGCOLOR</I></TD>
<TD>reconfigure the <B>background</B> of the Entry</TD>
<TR><TD><I>TEXT</I>,<BR>or any other tag</TD>
<TD>reconfigure the Entry to display the associated string.</TD>
</TABLE></DL>
and returns 1.
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
Entry has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
and position extraction during the <I>drag-over</I>.
<BR>If <B>dropovercmd</B> is empty, the wrapper accepts the drop if <B>editable</b> option is
true and <B>state</B> option is normal.
<BR>If <B>dropovercmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the Entry,
<LI>the pathname of the drag source,
<LI>the event,
<LI>the numeric index in the entry designated by the cursor,
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
and must return a value conforming to <B>dropovercmd</B> option described in
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
Default accepts <I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I> and <I>TEXT</I>,
all with <B>copy</B> and <B>move</B> operations.
</DD>
</DL>
<DL><DT><A NAME="-editable"><B>-editable</B></A></DT>
<DD>
Specifies whether the Entry is editable by the user. Equivalent to the <B>state</B> option
of the Tk entry widget.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-show"><B>-show</B></A></DT>
<DD>
If this option is specified, then the true contents of the entry are not displayed in the
window. Instead, each character in the entry's value will be displayed as the first character
in the value of this option, such as ``*''. This is useful, for example, if the entry is to
be used to enter a password. If characters in the entry are selected and copied elsewhere, the
information copied will be what is displayed, not the true contents of the entry.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of two states for the Entry: <B>normal</B> or <B>disabled</B>.
In normal state the text of the Entry is displayed using the <B>foreground</B> option.
In disabled state the text of the Entry is displayed using the <B>disabledforeground</B>
option. If the entry is disabled then the value may not be changed by user input
and no insertion cursor will be displayed, even if the input focus is in the widget.
Disabled state is the same as not editable with visual effect.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies an integer value indicating the desired width of the entry window, in average-size
characters of the widget's font. If the value is less than or equal to zero, the widget picks
a size just large enough to hold its current text.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
</DT><DD>
Calls the command specified by the option <B>-command</B>.
</DD></DL>
</BODY></HTML>