6 Replies Latest reply on Dec 26, 2013 7:21 PM by amy

    New Window Issues

    amy

      Hello All,

       

      I have a question regarding FM windows and how to control them! I have had all kinds of trouble with this!!! If I go to another layout and open that layout in a new window it;

       

      A. Opens the New window to the size specified, but changes the size of the orignal window, why?

       

      B. Opens the New window, then puts it underneath the old window when I try to use a the select window script step then adjust window to adjust the original window, then the select window script step to select the new window. I even ran the script debugger on this, it appeared to skip right over the last select window script step, weird!!!

       

      C. If I can actually get the windows and their sizes to function correctly it does not always work! Sometimes it does, sometimes it doesn't, seems to depend on what else is open!

       

      D. Opening a new window as a floating document window, all seems fine until the user trys to move the floating window. The original window changes size! Why would that happen?

       

      Is there a way to control windows in FM better? I would like to set the layout the user sees when the solution is opened to always be there, in otherwords lock it, so it does not ever move or change size, and not allow then to exit out of it either. I have been somewhat successful is using the adjust window script step and then selecting resize to fit, but even this seems to only work some of the time.

       

      Has anyone else sxperienced these problems? Does anyone know what options are available to help control windows more? This has been completey frustrating! I am using FM 13 Advanced and this particular solution is running on Windows 7.

       

      Any suggestions or help would be GREATLY appreciated!

       

      Thanks,

      Amy

        • 1. Re: New Window Issues
          BruceRobertson

          Please provide an example file.

           

          Looks like all the problems you are describing are a result of how you write your scripts.

           

          But you have not provided a copy of the file so we can't see your scripts.

          • 2. Re: New Window Issues
            SteveMartino

            A.  In windows, if the main (first window) is maximized, when you open the second window, this happens.

            B.  Is the first window of Type Document?  What type of window is the second type? If you don't maximize the first window, but stretch it to fill the screen height & width, this won't happen.  Then you won't have to use any scripts to resize it.

             

            C & D are related to A & B. 

            But as Mr. Robertson said, all of this is fixable if you provide a copy of your DB.

            • 3. Re: New Window Issues
              amy

              Thanks for the reply Bruce!

               

              I created a simple solution that illustrates my issues. When I was messing with the scripts I did notice why I am having a few of the issues with the windows on my Customers Solution, but NOT all of them.  The biggest thing is the main window (Called AcceessPanel in my example solution attached) needs to stay maximized and it does not.  Trying to adjust it's size with the other windows open is where a lot of my problems are coming from, whether through a script or user interaction.  Also adjusting the size of the AccessPanel window while the floating window is open causes the the floating window to change size when it's subsquently moved by the user.

               

              Let me know if there is anything I can do about this.  Also is there a way to control the closing of windows? 

               

              Thanks!

              Amy

              • 4. Re: New Window Issues
                amy

                Hi Steve,

                 

                I updates the file I attached, I found another window issue with it!  I have tried to stretch it to fit screen, that's when it only worked some of the time!  All windows with the exception of the floating document window are Type Document.  So I basically cannot have the first window maximized if I want it not to change size, right? 

                 

                Is there a way to lock the main window so it cannot be moved or closed by the x in the far right corner?

                 

                Thanks,

                Amy

                • 5. Re: New Window Issues
                  Mike_Mitchell

                  Amy -

                   

                  No, you cannot leave the first window maximized. This is a function of the way application windows work in the Windows environment. You can compensate somewhat by determining the maximum size of the application window and setting the window size to that (allowing room for title bar and scroll bars), but Windows will automatically set the windows to Restore size as soon as you have more than one.

                   

                  To your second question, to trap the close gadget, there are a couple of methods:

                   

                  1) The "quick and dirty" trick is to use an OnLayoutExit trigger. If you set an Exit Script script step with a False exit condition, then the triggering action is stopped. You can use this to prevent a window from being closed unless some other condition(s) is / are met.

                   

                  2) A slightly more sophisticated technique involves opening a second window that substitutes for the main window and eliminates the close gadget altogether. In order to do this, you need to process a series of steps in your opening script:

                   

                  - Rename the main window to something other than the name of the file.

                  - Spawn a second window that has no close gadget (using the appropriate settings).

                  - Rename the second window to the name of the file.

                  - Close the first window.

                   

                  By doing this, you will be basically replacing the original window with a new one of the same name, but without the close gadget.

                   

                  HTH

                   

                  Mike

                  • 6. Re: New Window Issues
                    amy

                    Thanks Mike!  I actaully have all the issues sorted out.  I really appreciate the help