Page 1 of 1

Resize windows to various monitor resolutions

Posted: Tue May 31, 2011 8:45 pm
by tturner43
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?

Re: Resize windows to various monitor resolutions

Posted: Wed Jun 01, 2011 2:29 am
by BvG
you set the "rectangle" of the stack, and have a "resizestack" handler that in turn resizes the controls properly. So it's all code.

Re: Resize windows to various monitor resolutions

Posted: Wed Jun 01, 2011 4:29 pm
by tturner43
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...

Re: Resize windows to various monitor resolutions

Posted: Wed Jun 01, 2011 4:32 pm
by BvG
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

Re: Resize windows to various monitor resolutions

Posted: Wed Jun 01, 2011 4:45 pm
by tturner43
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....