Screen Resolution (dynamic resizing of app)

I am new to XOJO and I am looking to create my app primarily for tablets. Therefore, the orientation will be “Portrait”. Questions:

  1. How can the app startup maximized to the tablet’s screen?
  2. How can the app dynamically resize based on different screen resolutions? I have tried the live resize and it does not seem to affect anything. I would like the main window to increase in size with the controls following suit when I use a tablet with a higher resolution and vice versa).
  3. I saw a third party extension called Elastic Window??? If this is a solution, I cannot seem to find where to obtain it.

I have attached a screen shot of one view on the Main Page Panel. This app will have charting, a spread sheet, images, maps and many controls that I would like to dynamically resize based on the target screen resolution. I have been designing with a Main Window size of 400w x 640h.

Thanks in advance !!

1… MAXIMIZE EVENT
2… Live Resize is only in effect if you are dynamically changing the window (dragging it around a desktop)
3… I believe that product is no longer available or supported (I might be wrong)…

And I assume this is for a Windows tablet, not an iOS one

I would contact Christian at Pariahware. http://pariahware.com He might be able to tell you if he sold it or if it’s still available.

  • Set Window.Fullscreen to True
  • Go Windows.Maximize

If what you want to do is to keep the same aspect for all resolutions, you can get the current resolution in the Windows.Resize event with Screen(0). See http://documentation.xojo.com/index.php/Screen

When you design your window for 400 x 600, you can create for each dimension of a control and it’s location a ratio value, based on the absolute value at design time.

For instance, let us say your map box is at 20 pix Left, 200 Top, 300 height and 360 width. You can calculate for each a ratio of the screen size, for instance
20 pix left = 20/400 = screen width * 0.05
200 top = 200/600 = screen height * 0.33
300 height = 300/600 = screen height*0.5
360 width = 360/400 screen width * 0.9

Now if instead of using a fixed value for each of these parameters you base them on the screen size you get in Resized with Screen(0).Width and Screen(0).Height, you can effectively resize dynamically all your controls based on a percentage of the screen size that will remain the same whether you are at 400 x 600 or 1080 x 1920. You do have to do the same for font sizes 12/400 = screen width*0.03, and this will give you a resolution-independent layout.

Hmmm… wonder if I can alter the “autolayout” method I am using for another project to work here??? (scratches head)

Thank you for the quick replies. Awesome and helpful forum !