Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class & resize
Message
De
25/08/2000 14:45:50
John Murray
Health Research, Inc.
Albany, New York, États-Unis
 
 
À
25/08/2000 13:59:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00409258
Message ID:
00409362
Vues:
25
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
Fil
Voir

Click here to load this message in the networking platform