Thats exactly what the code above does. Simply put the above code in a proc and call that proc on the click of a command button on window 1. That will start a new window-- Window 2 and you can have the two buttons on it as you want-Ok and Cancel. Write two seperate procs or simply single proc...
Source the file where you have included the functionality of the command and then call the command using the namespace (if you have created it using a namespace.)
Say you have the command defined in abc.tcl in /x/y/z directory
then do a
source /x/y/z/abc.tcl
and you have the function...
if using vi then do a !wq. Give the filename.tcl as file name.
and if using emacs than Cntrl X S to save and Cntrl X C to quit
I hope this is what you wnat.
Hi,
I think the link below has an example that should help you solve the problem:
http://www.ccs.neu.edu/research/demeter/course/projects/demdraw/www/tickle/u3/tk3_dialogs.html
Basically you need a toplevel window which will be the child of the main window and then put all the widgets that...
Yup,
Poise90 is right. You could also put the package require <package name> statements in the beginning of your source tcl file.
package require Bwidget
Hope this helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.