Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Different screen resolutions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00136440
Message ID:
00137063
Vues:
19
Of course they should know something about each other. The Cancel button knows it goes in the bottom left corner. The Ok button checks for an instance of PARENT.cmdCancel and if so, array itself with the same .Top property, just to the left by a required number of pixels. If on the other hand PARENT.cmdCancel doesn't exist then cmdOk goes to the bottom left corner. End of story.

Moreover of Ok-Cancel live in a container, then the container can place itself in the bottom left hand corner. End of story. Moreover again you can work it so that the form places buttons where it wants.

There are dozens of ways to wire it, an it all has a vary clean interface, namely a THIS.SetSizeAndPosition(), late in the Form's Init(), which is broadcast downwards to all containers and contols.

You have to understand that SetSizeAndPosition is instance specific and the class behavior, other than the ability to reckon Win95 margin and safety metrics, is empty.

You could have a mediator but in practice it's so slick to have objects recursively place themselves, so why bother.


>
>But does that work? For example, how does each button in a group of four reposition itself to the bottom right of the dialog box without each knowing about the other? Or is that what you're saying, that each _should_ know about the other?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform