1<TITLE>timefield - Create and manipulate a time field widget</TITLE>
2<H1>timefield - Create and manipulate a time field widget</H1>
3
4</pre><H2>SYNOPSIS</H2>
5<B>timefield<I> <I>pathName </I>?<I>options</I>?
6</pre><H2>INHERITANCE</H2>
7itk::Widget &lt;- LabeledWidget &lt;- timefield
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>justify</B><br>
15</td>
16<td valign=top>
17<B>borderWidth</B><br>
18<B>highlightColor</B><br>
19<B>relief</B><br>
20</td>
21<td valign=top>
22<B>cursor</B><br>
23<B>highlightThickness</B><br>
24</td>
25<td valign=top>
26<B>exportSelection</B><br>
27<B>insertBackground</B><br>
28</td>
29</table>
30<P>
31See 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.
32</pre><H2>INHERITED OPTIONS</H2>
33<P>
34<table cellpadding=5>
35<td valign=top>
36<B>disabledForeground</B><br>
37<B>labelMargin</B><br>
38<B>state</B><br>
39</td>
40<td valign=top>
41<B>labelBitmap</B><br>
42<B>labelPos</B><br>
43</td>
44<td valign=top>
45<B>labelFont</B><br>
46<B>labelText</B><br>
47</td>
48<td valign=top>
49<B>labelImage</B><br>
50<B>labelVariable</B><br>
51</td>
52</table>
53<P>
54See the <A HREF="labeledwidget.n.html"> "labeledwidget" </A> class manual entry for details on the 
55inherited options.
56</pre><H2>WIDGET-SPECIFIC OPTIONS</H2>
57<P>
58<pre>
59Name:                   <B>childSitePos</B>
60Class:                  <B>Position</B>
61Command-Line Switch:	<B>-childsitepos</B>
62</pre>
63<UL>
64Specifies the position of the child site in the time field: <B>n</B>, 
65<B>s</B>, <B>e</B>, or <B>w</B>.  The default is e.
66</UL>
67<P>
68<pre>
69Name:                   <B>command</B>
70Class:                  <B>Command</B>
71Command-Line Switch:	<B>-command</B>
72</pre>
73<UL>
74Specifies a Tcl command to be executed upon detection of a Return key 
75press event.
76</UL>
77<P>
78<pre>
79Name:                   <B>state</B>
80Class:                  <B>State</B>
81Command-Line Switch:	<B>-state</B>
82</pre>
83<UL>
84Specifies one of two states for the timefield: <B>normal</B> or <B>disabled</B>.
85If the timefield is disabled then input is not accepted.  The default is
86normal.
87</UL>
88<P>
89<pre>
90Name:                   <B>textBackground</B>
91Class:                  <B>Background</B>
92Command-Line Switch:	<B>-textbackground</B>
93</pre>
94<UL>
95Background color for inside textual portion of the entry field.  The value
96may be given in any of the forms acceptable to <B>Tk_GetColor</B>.
97</UL>
98<P>
99<pre>
100Name:                   <B>textFont</B>
101Class:                  <B>Font</B>
102Command-Line Switch:	<B>-textfont</B>
103</pre>
104<UL>
105Name of font to use for display of text in timefield.  The value
106may be given in any of the forms acceptable to <B>Tk_GetFont</B>.
107</UL>
108<P>
109</pre><HR>
110
111</pre><H2>DESCRIPTION</H2>
112<P>
113The <B>timefield</B> command creates an enhanced text entry widget for
114the purpose of time entry with various degrees of built-in intelligence.
115</pre>
116
117</pre><H2>METHODS</H2>
118<P>
119The <B>timefield</B> command creates a new Tcl command whose
120name is <I>pathName</I>.  This
121command may be used to invoke various
122operations on the widget.  It has the following general form:
123<pre>
124<I>pathName option </I>?<I>arg arg ...</I>?
125</pre>
126<I>Option</I> and the <I>arg</I>s
127determine the exact behavior of the command.  The following
128commands are possible for timefield widgets:
129</pre><H2>WIDGET-SPECIFIC METHODS</H2>
130<DL>
131<DT> <I>pathName <B>cget</B> <I>option</I>
132</I></B>
133<DD> Returns the current value of the configuration option given
134by <I>option</I>.
135<I>Option</I> may have any of the values accepted by the <B>timefield</B>
136command.
137</DL>
138<DL>
139<DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?
140</I></B>
141<DD> Query or modify the configuration options of the widget.
142If no <I>option</I> is specified, returns a list describing all of
143the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for
144information on the format of this list).  If <I>option</I> is specified
145with no <I>value</I>, then the command returns a list describing the
146one named option (this list will be identical to the corresponding
147sublist of the value returned if no <I>option</I> is specified).  If
148one or more <I>option-value</I> pairs are specified, then the command
149modifies the given widget option(s) to have the given value(s);  in
150this case the command returns an empty string.
151<I>Option</I> may have any of the values accepted by the <B>timefield</B>
152command.
153</DL>
154<DL>
155<DT> <I>pathName <B>get</B> ?<B>format</B>?
156</I></B>
157<DD> Returns the current contents of the timefield in a format of 
158string or as an integer clock value using the <B>-string</B> and <B>-clicks</B>
159format options respectively.  The default is by string.  Reference the 
160clock command for more information on obtaining times and their 
161formats.
162</DL>
163<DL>
164<DT> <I>pathName <B>isvalid</B>
165</I></B>
166<DD> Returns a boolean indication of the validity of the currently
167displayed time value.  For example, 12:59:59 is valid whereas
16825:59:59 is invalid.
169</DL>
170<DL>
171<DT> <I>pathName <B>show</B> <I>time</I>
172</I></B>
173<DD> Changes the currently displayed time to be that of the time 
174argument.  The time may be specified either as a string, an
175integer clock value or the keyword "now" (the default). 
176Reference the clock command for more information on obtaining
177times and their formats.
178
179</DL>
180</pre><H2>COMPONENTS</H2>
181<P>
182<pre>
183Name:                   <B>time</B>
184Class:                  <B>Entry</B>
185</pre>
186<UL>
187The time component provides the entry field for time input and display.
188See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/entry.n.html"> "entry" </A> widget manual entry for details on the time component item.
189</UL>
190</table>
191
192</pre><H2>EXAMPLE</H2>
193<pre>
194 proc returnCmd {} {
195   puts [.tf get]
196 }
197
198 timefield .tf -command returnCmd
199 pack .tf -fill x -expand yes -padx 10 -pady 10
200</pre>
201</pre><H2>AUTHOR</H2>
202John A. Tucker
203</pre>
204Mark L. Ulferts
205</pre><H2>KEYWORDS</H2>
206timefield, widget
207