On Wed, 4 Mar 1998, Milan Vujic wrote:
> Earlier, you mentioned :
>
> > 2) use the tcl clock command with the tcl after command (for example,
> > every second) and simply update the textvariable for an entry
> > widget and you've got a clock widget in just a few lines of Tcl.
>
> Could you please let me know what those few lines of Tcl code might be?
> I tried the '-repeatDelay 1000' option. However, it doesn't seem to work.
The following updates every second. Look at the doc for "clock format" and
choose what ever date/time format you like. Change the after 1000 to after
60000 to update every minute, etc.
proc settime {} {
global time
set time [clock format [clock seconds]]
after 1000 settime
}
entry .e -textvariable time -width 26
pack .e
settime
...RickM...
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).