Closing of a
Hey guys,
I created a .tcl-script which opens a window where I can put in a reference temperature. After the value is entered, I would like the window to be closed automatically and hence to exit the program.
I can't find any commands (like an exit-command) that work the way I want them to. Can you help me out on this topic?
Kind regards,
Simon
Attached you can find the script:
Answers
-
Hi,
In your code,
destroy .window11
will close the window. Not sure how to close it as soon as you enter a value.
0 -
You can use hwtk::inputdialog
Refer https://community.altair.com/community?id=community_question&sys_id=4376083a1b2bd0908017dc61ec4bcb6d
0 -
Hey guys,
thank you both for your quick replies.
There's still a problem left. After entering the value for the first time and closing the window, I open the same window again by clicking on my button. The value I entered the first time seems to be stored somehow, because it's still appearing on the screen.
Do you know how I can delete the value and clear the window?
Kind regards,
Simon
0 -
If you use an entry widget, clear its content by
$e delete 0 end
Or set value of its text variable as ''
0 -
In current program you can use
catch {unset ref_temp}
in the beginning.
0