Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoid overlapping objects or SYS(1270)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00196959
Message ID:
00197398
Vues:
27
Sorin,

It sounds like the objects are all within the same parent container like a Form? If so just have the object send a reference to itself to a method of the container of all the objects. That method can iterate through everything in it's Controls[] collection and adjust the position of the object accordingly. So the object Init() and Move() would:

this.parent.MakeSurePartOfMeIsVisible( this )

Get a textbook on graphics algorithms, you should be able to find a couple of ways to efficiently test for object overlap. Check also for clipping algorithms.

>Objtoclient() was the first thing I thought of, however for using Objtoclient() you must specify the object to find its position and I need a function that would evaluate the position and return the object at that position -like SYS(1270, nX, nY). The problem is that SYS(1270) needs nX and nY to be absolute screen coordinates.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform