Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Fitting Window.Open to screen
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BigBear




PostPosted: Wed Mar 04, 2009 12:35 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Mar 04, 2009 2:40 pm   Post subject: RE:Fitting Window.Open to screen

Turing:

View.Set("graphics:max,max;")
View.Set("graphics:" + intstr(maxx-100) + ",max;")
put "foo"
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
BigBear




PostPosted: Wed Mar 04, 2009 2:58 pm   Post subject: 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




PostPosted: Wed Mar 04, 2009 3:01 pm   Post subject: 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
BigBear




PostPosted: Wed Mar 04, 2009 3:30 pm   Post subject: 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
Turing:
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

Turing:

var win : int := Window.Open ("position:top;center,graphics:max,max;")
View.Set ("graphics:" + intstr (maxx div 2) + ",max;")
DemonWasp




PostPosted: Wed Mar 04, 2009 3:50 pm   Post subject: 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




PostPosted: Wed Mar 04, 2009 3:51 pm   Post subject: 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: