6 Replies Latest reply on Jan 8, 2010 4:45 PM by DLW-BPEX

    New window



      New window


      When we use the command "new window" to create a window over another one, the current window is supposed to stay in place, unchanged, and the new window to be created over it. When I use the new window command, the new window is effectively created in position and size wanted, but the current window (s) always reduces in size and stack.

      Can someone help me in solving this issue to ensure that the current window remain unchanged upon creation of a new one (such as a pop-up)


        • 1. Re: New window

          This is a known bug on Windows platforms with no complete fix. You can use Move/Resize window to minimize the re-size--especially if the parent window is maximized.


          Here's how my script minimize the window size change:


          New Window[//specify your popup window here]

          Move/Resize Window [Name: "ParentWindowName"; CurrentFile ; Height: Get (screenHeight); Width: Get (ScreenWidth); Top: 0; Left: 0]


          Then I use a script to close the pop up window which also includes an Adjust Window [maximize] to pop it the rest of the way out after the pop up window has been closed.

          • 2. Re: New window

            Phil, Many thanks,  It works just fine !


            • 3. Re: New window


              Thank you. This is very helpful to me, also. As one who works on a Mac but accepts the reality that most users probably will be on Windows, it is good to have these tips in mind ahead of time.


              It occurs to me, though, that users often may not want the window maximized -- for example, on a 17-inch laptop display where much of the screen may be empty layout. So, would the following approach work?


              - In the script, first get current window size (and position, if desired).

              - Set height, width, left, top variables accordingly.

              - Then open new window.

              - Then Move/Resize "ParentWindow" as you suggested, but using values from the window size/position variables instead of screen dimensions.


              I'm not the most experienced with script variables, but would this not work to retain the original window size and position? Can you specify window properties with variables in this way?




              • 4. Re: New window
                   It sounds right, but I don't have the time to try it out and see right this moment. Any other Windows user want to see if that works? (or does the bug even appear if the window isn't maximized?)
                • 5. Re: New window


                  After playing around with this and thinking about it more, I like your solution.


                  As you suggested, if the window is not maximized, the bug does not appear. The new window assumes the dimensions of the old one (unless new dimensions are specified). All is well.


                  My original concern about a maximized window hogging screen space is not relevant after all, since this buggy resizing behavior relates to the FILE window, not the APPLICATION window. (Not an issue on a Mac.)

                  It seems reasonable that users would be okay with the FILE window usually/always maximized, and the APPLICATION window then adjusted to whatever size fits everything in without wasting screen space.



                  • 6. Re: New window

                    But the unfortunate irony seems to be...


                    On the Mac platform, maximizing the original window upon closing the pop-up window DOES fill the whole screen. Not necessarily okay for a runtime or otherwise cross-platform solution.

                    I suppose this can be addressed with more scripting, OS checking, etc...


                    As an alternative, I am looking into using Adjust Window [Resize to Fit] instead of [Maximize]. And if the layout is such that some border width around objects is needed, some invisible "dummy" lines can define the boundaries of what must "fit".


                    Does this make sense? Any insights from others?

                    Thank you,