Home » Community » Newbie corner » Zooming layout in Windows
Re: Zooming layout in Windows [message #36053 is a reply to message #36052] |
Sun, 22 April 2012 02:52   |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
Dear Lance
Thank you very much. I reeally appreciate your help. I am considering something on the lines of this (I'm using pseudo code here).
Size Designsz = OriginalLayoutSizePos (const)
Size wsz = GetSizePos(MainWindow); // current sizepos
int ratiox = wsz.x / Designsz.x; // amount of X change
int ratioy = wsz.y / Designsz.y; // amount of Y change
// for each widget on the layout, (helps to add/remove widgets later on as the project grows)
for (Widget=0; Widget < LastWidget; Widget++)
{
// scale each widget. Maybe I need to adjust the LeftPos and TopPos too for each widget
Widgets[Widget].Size.x *= ratiox
Widgets[Widget].Size.y *= ratioy
}
// update all widgets on the layout
Refresh();
[Updated on: Sun, 22 April 2012 03:02] Report message to a moderator
|
|
|
 |
|
Zooming layout in Windows
By: jerson on Tue, 17 April 2012 19:49
|
 |
|
Re: Zooming layout in Windows
By: jerson on Sat, 21 April 2012 03:11
|
 |
|
Re: Zooming layout in Windows
By: Lance on Sat, 21 April 2012 15:56
|
 |
|
Re: Zooming layout in Windows
By: jerson on Sat, 21 April 2012 16:15
|
 |
|
Re: Zooming layout in Windows
By: Lance on Sat, 21 April 2012 19:56
|
 |
|
Re: Zooming layout in Windows
By: Lance on Sat, 21 April 2012 20:15
|
 |
|
Re: Zooming layout in Windows
By: jerson on Sun, 22 April 2012 02:52
|
 |
|
Re: Zooming layout in Windows
By: Lance on Sun, 22 April 2012 03:17
|
 |
|
Re: Zooming layout in Windows
By: Lance on Sun, 22 April 2012 05:12
|
 |
|
Re: Zooming layout in Windows
By: jerson on Sun, 22 April 2012 05:49
|
 |
|
Re: Zooming layout in Windows
By: Lance on Sun, 22 April 2012 14:29
|
Goto Forum:
Current Time: Mon Apr 28 14:18:47 CEST 2025
Total time taken to generate the page: 0.05056 seconds
|