Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling resize and anchoring
Message
De
20/01/2007 08:23:12
 
 
À
20/01/2007 08:01:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01185929
Message ID:
01187327
Vues:
37
> ... but maybe that's because I was trying to do it from the other side.
> That is, my goal was to recognize the interactive resize and leave anchoring
> there, but reset it on programmatic changes.

Yes, that's close to impossible, but as you certainly know, when you want to programmatically resize the form, you can easily set up a flag that marks the assigns as a programmatic resize and you even can set that flag back to false, after you are done.

So if you want a programmatic resize to disregard anchoring for that resize and reanchor the control you could do:

Left_assign:
lparameters vNewvValue

if !thisform.lDontAnchor
   this.left = vNewVAlue
endif

if thisform.lReanchor
   Local lnAnchor
   lnAnchor=this.Anchor
   This.Anchor = 0
   This.Anchor = lnAnchor
endif
Maybe you need the reanchoring part of that code only in the assign of left,top,width and height, which is set last by a resize. I think there will be a order, in which these properties get their new values by an interactive resize. Otherwise you may get strange results due to different anchor positions and size in the computation of new values. This way you do th reanchoring not after the resize is done for the whole form, but after it is done for that control, which should be sufficient.

You may want a reanchoring everytime you do a programmtic resize, then let lDontAnchor and lReanchor be the same flag property.

Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform