Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form resizing...
Message
From
13/04/2000 15:23:12
 
 
To
10/04/2000 19:37:20
Frank Cavone
Monetary Management of Ny, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00357740
Message ID:
00359452
Views:
16
Frank,

It's not too difficult to write a resize object. In all my interface baseclasses, I've created a property which is an object reference to my resize object. When the form inits, I NEWOBJ the autoresize object. It determines it's relative size and position in it's container, and adjusts the calling object accordingly. I also created resize methods in all my interface baseclasses, which call the resize method of this object.

There are now 2 important tricks:
1) You have to adjust all your base container classes to go through the control object array and call all the resize methods of each object.
2) YOu have to create a custom event which releases the reference to the resize object (otherwise you get that nasty dangling reference problem when your containers are destroyed). Kevin McNeish wrote a great article about custom events in the Jan. 2000 FoxPro Advisor. It's pretty basic stuff.

It took about a day for me to write this resize object, and now I never have to think about it. It's very cool, actually. Everything I place on a form automatically resizes, and I don't have to do a thing. You can even tweak the resize object to re-adjust font sizes etc. depending on how much the objects resize. Very powerful. The resize code in all my non-baseclasses is empty, yet everything automatically resizes! It's great.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform