On Wed, 5 Feb 1997, Ryan Huynh wrote:
> Dear Sir or Madam,
>
> I'm using Visual TCL to create really nice custom GUI with labels and one
> EXIT button to exit out of the GUI. Next to each label, I have a blank label
> with -relief sunken -textvariable getdata, to display the data I get from
> running a command at the csh prompt. I couldn't find any option in VCTL to
> run a command and display the output or data in the label box. I'm not
> really sure if I can use the entry box to display data because I think it's
> for data entry. Please let me know if there are other ways to display data
> from running a command line program and also how to display only a certain
> part of the data on the GUI blank label box or whatever box to display. For
> example, this is part of what I like to display in my GUI.
>
> showDate Wed.1/4/97 <--- taken from %date command or I guess "exec date"
> showTime 1:20PM <--- taken from %time command or I guess "exec time"
>
> Thank you in advance for your help and time. I'm looking forward to your
> reply. Take care.
Ryan,
You can use entry labels to both read and display data using the
"-textvariable" option. This is also accessable through the
attribute editor.
if you have an entry like this:
entry .e -textvariable time_data
you can change the entry display by setting the variable:
set time_data [exec date]
If you then type into the entry box, it will change the value
of time_data. You can avoid this by either using a label or
setting the -state on the entry to disabled.
-stewart-