Resize windows to various monitor resolutions

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
tturner43
Posts: 21
Joined: Fri May 27, 2011 10:01 am
Contact:

Resize windows to various monitor resolutions

Post by tturner43 » Tue May 31, 2011 8:45 pm

In old visual basic windows app, we had to use a resize control that when user wanted app full screen... it would resize the window AND all the controls and text boxes and labels in that window.

How do you do that with a stack? Let's say app starts up and defaults to a specific stack and card... how do we make it resize to window size and all its contained controls?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Resize windows to various monitor resolutions

Post by BvG » Wed Jun 01, 2011 2:29 am

you set the "rectangle" of the stack, and have a "resizestack" handler that in turn resizes the controls properly. So it's all code.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

tturner43
Posts: 21
Joined: Fri May 27, 2011 10:01 am
Contact:

Re: Resize windows to various monitor resolutions

Post by tturner43 » Wed Jun 01, 2011 4:29 pm

Do you have sample code? We used a 3rd party control for this... resizing all the controls on a card/window is not a trivial exercise...

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Resize windows to various monitor resolutions

Post by BvG » Wed Jun 01, 2011 4:32 pm

third party controls like the datagrid actually often handle the "resizeControl" message. Other have their own specific handler to call for resizing. did you look at the dictionary entry for "rectangle"? that's really all there is to it:

Code: Select all

set the rectangle of field 1 to 0,0, the widht of this card, the height of field 1
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

tturner43
Posts: 21
Joined: Fri May 27, 2011 10:01 am
Contact:

Re: Resize windows to various monitor resolutions

Post by tturner43 » Wed Jun 01, 2011 4:45 pm

are you referring to the datagrid built into Runrev or a 3rd party data grid? Just asking as we are looking at the data grid controls as well... need one that we can color the columns separately with different colors like red, green, yellow, or no color/white....

Post Reply