3 Replies Latest reply on May 26, 2016 10:43 PM by CICT

    Window size: How to adjust to hardware?

    tays01s

      I have a runtime with Window sizes fixed. When I transferred the solution from a Mac to a PC, there were not just smaller (I think because of higher screen res) but too small to fit the content. I don't want to oversize the windows because that could look messy.

       

      What checks/ instruction lines might I build into the window-launch scripts to adjust for hardware (only Mac/PC at the moment, perhaps iPad/iPhone in the future) differences.

        • 1. Re: Window size: How to adjust to hardware?
          CICT

          You can use Get ( SystemPlatform ) to identify the hardware, with < 0 being Windows, 1 Macs and 3 IOS.

           

          We tend to always run Windows in maximised mode, whereas Macs to a preset size (you don't necessarily want a 27" screen filled up with a database). Windows users can take the application out of maximise, whereas the inner file window can be left maximised filling this.

           

          For modal windows, we again use SystemPlatform to check and take no action for Macs. For Windows we run a subscript, set variables using Get ( WindowHeight) - and Width, Left and Right, take the window out of maximise and set the dimensions to the variables containing height, width, etc so it is positioned the same but not maximised.

           

          These variables are then passed back to the main script (using Exit Script and Get ( ScriptResult)  and the modal window is created based on say $left + 20 pixels, $top + 20 pixels and set the size needed - using the $left and $ top allows the window to be relative to the original, using fixed locations can result in windows appearing in odd locations, particularly if using 2 displays. Windows in maximised mode will always fill the screen up, so this provides a proper looking modal sub window with minimal screen refresh to the user.

           

          Upon closing the modal window we again check SystemPlatform and, if Windows, return the original window to maximised.

           

          Hope this helps

           

          Andy

          • 2. Re: Window size: How to adjust to hardware?
            tays01s

            2 things:

            1. I'm running the Runtime in Kiosk mode, so will this affect the advice given?

            2. I'd been using 'document' windows, not modal. Because the solution is script driven and, short of quitting the app, users can get back to 'Home' window from where they can get any of the other windows back in the same state they closed it, is there any advantage to using modal windows (I'd never investigated these, so am ignorant!).

            Thanks,

            Stephen

            • 3. Re: Window size: How to adjust to hardware?
              CICT

              Hi Stephen

               

              Not really, but the modal windows advice was really for reference in that Windows cannot currently show a FileMaker window using 'New Window' and set sizes the same way it does with the Mac. I'm sure as FileMaker develop, eventually this will change. Therefore in Windows, if you open a window set to a size of 1000 x 600 pixels, it will open fine on the Mac as a smaller window compared to the background window, whereas if Windows is set to maximise, then the new window will also fill the whole screen. The only way you can 'size' a 2nd (or 3rd) window is to take the original out of maximise first, hence the detail supplied.

               

              This is true of both 'document' and 'modal' windows, the technique has to be the same. If you don't mind always having windows filling the whole screen, then it isn't a problem that needs dealing with.

               

              We use modal windows usually to control what the user can do, but it is a personal preference only. The main issue to watch out for is that when you're developing and (like us you disable the 'close window' option, for goodness sake ensure you have a button on the layout to 'close window'.

               

              All the best

              Andy