Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to move and resize a control at runtime
Message
 
To
07/02/2007 15:55:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01193391
Message ID:
01201808
Views:
16
To move and resize a control at runtime, I use the resize event of the main form.
In it I put things like...
thisform.grid1.height = thisform.height - 75
thisform.grid1.Width = thisform.Width - 38
and for controls,
thisform.cmdUpdate.Top = thisform.height - 43
thisform.cmdSearch.Top = thisform.height - 43
thisform.cmdopt.Top = thisform.height - 43
*thisform.cmdLogoff.Top = thisform.height - 43
thisform.cmdClose.Top = thisform.height - 43
You have to do a little playing with the numbers and of coures revisit this if you ever relocate a control.
Of course you can play with the width of the controls, but after a while you will have to address the font size.

HTH
Ron Seidl
Independent Developer
VFP

"I'm playing in life's theater in anticipation of a great cast party!"
Previous
Reply
Map
View

Click here to load this message in the networking platform