'''Running two copies of the program simultaneously or setting up two windows with one copy of the program running''' [Didier](Saturday February 5th 2011) I'd like to program my editor so that two copies of the program run at the same time: the first version of the Editor will occupy one half of the screen and the second one will occupy the other half. I am doing this so that I can copy and paste parts of documents more easily than if I open two copies of the program on two different windows. How should I proceed? Please note once again that I'd like the two programs to open at the same time on split screen. Tx! [RLE] (2011-05-05): Your question appears to mix some metaphors. Do you really want two independent copies of the program, or are you just asking for a split-screen, side-by-side view of two documents? I.e., you want one big window, which contains two document views side by side? If so you should take a look at the [ttk::panedwindow] widget if you are running 8.5.x. You can put two [text] widgets inside of it side by side. Or, you could just open two top level windows, put one [text] widget in each, and then using the [wm] command, adjust the sizes and positions of the two windows so that the each take up a half screen, and sit side by side. [Didier] (2011-02-05) Tx [RLE]. I imperatively must open two copies of the same program for technical reasons and not simply two windows. [RLE] (2011-02-05) fails to understand why such technical reasons exist, but suggests you take a look at [How to embed a non-Tk GUI into a Tk frame] which part way down mentions [BLT] containers among other ideas. You could also take a look at [Embedding Windows applications in Tk frames]. However I fear both will be suboptimal. You may simply find it easiest to either manually position and size both independent windows, or to include some form of command line argument or push button that sizes the windows appropriately. I.e., a -left/-right command line argument that causes the relevant window to be 1/2 screen on the left or right side, or a pair of buttons "Left" "Right" that reposition/size their parent toplevel to be 1/2 screen, left or right side. [Didier](2011-02-06)Tx again, RLE. Is there a simpler solution? What I want to do in fact is to load a precise page from Directory X on the left window and load another precise page from Directory Y on the right window. My editor works '''on a subdirectory level with automatic saving''' and if I open two files that belong to two different directories each on its own window, I get a '''gigantic screw-up''' and this is why I need to open two versions of the program. Version A will handle file in directory X and Version B will handle file in directory Y. I agree however that in most cases your solution works. But your solution would work with my editor only if both files belonged to the same directory. I have programmed what you suggest already. What I really want to do is to start two copies of the program simultaneously each working in its own window. As I said, each will open a different file in a different directory. I was thinking it would simply be a case of: - a) Open ''Editor Version 1.exe'' and run it on left window - b) Open ''Editor Version 2.exe'' and run it on right window What's really needed is the capacity to work with two files located on two different directories thus avoiding the gigantic screw-up that will result if I don't plan things differently. ----- '''Setting up the height of a window + What does pw stand for?''' [Didier] Saturday (February 5th 2011) This is a pretty dumb question. I have in my code the following width: .pw.add.pw.left -width 310 What do I have to do to set the height? This? .pw.add.pw.left -height 110. I tried and it does not work. Any idea what should be typed in? I have another question: I see pw.forget in the code. What does this forget do? What does it forget? :-) Thanks! [RLE] (2011-02-05): Without knowing what kind of widget that path (.pw.add.pw.left) refers to, it is impossible to answer your question. As to pw.forget, as we are not physic, we can't tell. "pw.forget" is not a built-in Tcl or Tk command, so it must refer to a proc that the code you are looking at has defined. So you will have to find the definition of pw.forget to find out what it does. Unless you meant ".pw.forget" (widget path), in which case, the answer is almost the same, look in the code for where "pw.forget" or ".pw.forget" is defined, and read what it does there. ----- <> Discussion | Development