How to create multiple windows in SpecTcl1.1?

  • Nobody/Anonymous

    I have a button on the root window. By clicking the button, I would like to have a separate window to be load up (top-level), and both of them (including the root window) can be activated by just high-lighting the window. 

    I know that I can source the new window tcl script(ie: source newWin.ui.tcl) but how do I load it up in a separate window instead of the root window?

    Thanks for your help!

    • Nobody/Anonymous

      remember to source the .ui.tcl file only once (e.g. when the program is started before any buttons are pushed. When the button is pushed you create a new toplevel window, and call the function newWin_ui with this toplevel as a parameter. The code would be something like:

      toplevel .newTop
      newWin_ui .newTop

      Alternatively you could do this in the beginning, and then hide the toplevel and only display it when the button is pressed.



Log in to post a comment.