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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement