
-----------------------------------
BigBear
Wed Mar 04, 2009 12:35 pm

Fitting Window.Open to screen
-----------------------------------
Is there any way of making a window large enough but not too large that some people will have to scroll depending on their resolution.

I know about max;max but if y9ou put max-100 is seems to go back to default.

-----------------------------------
Tony
Wed Mar 04, 2009 2:40 pm

RE:Fitting Window.Open to screen
-----------------------------------

View.Set("graphics:max,max;")
View.Set("graphics:" + intstr(maxx-100) + ",max;")
put "foo"


-----------------------------------
BigBear
Wed Mar 04, 2009 2:58 pm

RE:Fitting Window.Open to screen
-----------------------------------
Why do you need both of those View.Set lines?
Also how can you use it with Window.Open
just call Window.Open then View.Set the screen to the size you want?

-----------------------------------
Tony
Wed Mar 04, 2009 3:01 pm

RE:Fitting Window.Open to screen
-----------------------------------
The first line sets the maxx and maxy variables. Then you can use those values as you'd like.

-----------------------------------
BigBear
Wed Mar 04, 2009 3:30 pm

Re: Fitting Window.Open to screen
-----------------------------------
So why doesn't the max variables get called when you open a new window

Why do you have to use
var win : int := Window.Open ("position:top;center,graphics:max,max;")
View.Set ("graphics:max,max;")
View.Set ("graphics:" + intstr (maxx div 2) + ",max;")

instead of 


var win : int := Window.Open ("position:top;center,graphics:max,max;")
View.Set ("graphics:" + intstr (maxx div 2) + ",max;")

-----------------------------------
DemonWasp
Wed Mar 04, 2009 3:50 pm

RE:Fitting Window.Open to screen
-----------------------------------
Err - that works just fine. Tony's point is that maxx and maxy are only set when the window / view's size changes. So, to detect the maximum size of the screen, you have to open it maximised first, then read off the values for the size of the screen and adjust them as you want.

-----------------------------------
Tony
Wed Mar 04, 2009 3:51 pm

RE:Fitting Window.Open to screen
-----------------------------------
I think the second one would work. Have you tried it?

The only caveat is that you have to use max,max before maxx,maxy
