Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class & resize
Message
From
25/08/2000 14:45:50
 
 
To
25/08/2000 13:59:54
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00409258
Message ID:
00409362
Views:
24
There is no RESIZE property for the CONTAINER class, but if one really wants to do this there is some math involved to start.

First figure the percentage of the form height and width used by the container (or other object). Then put this code in the RESIZE Event of the form

This.objectname.height = this.height/[percentage of total size]
This.objectname.width = this.width/[Percentage of total size]

Note that I have not dealt here with relative positions of other objects. Objects below and to the left of the container would need to be moved relative to each other. This could be done for objects below by adding the objects height to the objects Top property then adding the number of twips needed for border to the total (thisobject.top + thisobject.height + 15 for instance) and doing the same with the LEFT property and adding the width plus the number of twips for border for any left side adjoining objects:

This.borderingobjectname.top = This.objectname.TOP + This.objectname.height + 15
This.borderingobjectname.left = This.objectname.left + This.objectname.width + 15

I have never used this but the code works when tested.


There would be a way to do this with reusable code using an array of objects, this would allow you to resize all objects relaive to the top left object, but I would not be able to work this out today.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform