Version 3 of How do you make two windows act as one?

Updated 2013-01-13 22:51:22 by RLE

Zipguy (2013-01-13) - My email is zipguypub @ thefreesite dot com please change the dot to a ".".

I'm working on ML - Heavily Modified & Improved, which I like a lot. It is available there with the one I've currently released. I've got a new problem.

I've been using TCL for a while, on Windows. I'm on a Windows laptop. I've decided to run it as two windows, from TCL terms (. and .proc). This maximizes the space for the main window. Now I have two windows running as one application, called ML v1.25b, which has not been released yet. It looks like this:

http://www.geocities.ws/thezipguy/misc/mlv125b.png

It works well. Even if you have closed the "Procedures" window, it's easy to re-open it, by using the "Window" menu (you can switch to another window and switch back to the one you were on, if you only have one entry under the Windows menu, you can make another by the File->New, and then you have two entries).

So my question is:

How can I make these two windows act as one.

For example, when the main one has been minimized, the remaining one, Procedures, remains unaffected. I have to minimize it also. And, visa versa when the main one has been restored, I have to restore the Procedure window also. I've been looking of into the TCL manual, which is rather large, and I thought it would be easier to ask this question here. I think I need to know when the "Minimize" button is pressed, put a bind or bindtag on that to tell the wm to minimize the Procedure window also. Also I need to know when they're restoring the windows also, in a likewise fashion. Thanks for any help in advance.


I categorized it as Tk. I hope that's right

RLE (2013-01-13): You need to read up on the Tk bind command, specifically upon the Map and Unmap events. You will need to use bind to cause a proc to be executed whenever a Map or Unmap event occurs, and perform the appropriate wm iconify or wm withdraw command on all the windows you want to act the same in response to the relevant event.