Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TxtBox Screen Location
Message
 
À
15/07/1998 10:33:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00117562
Message ID:
00117605
Vues:
18
If you want to do this without your controls needing to know how many levels deep it is nested, add AbsoluteTop and AbsoluteLeft properties to all your classes. In the init (or refresh if you expect them to move), add something like this:
this.AbsoluteTop = this.parent.AbsoluteTop + this.Top
this.AbsoluteLeft = this.parent.AbsoluteLeft + this.Left
This is a simplified example of course. There may be other things you'll need tot take into consideration, but you get the idea.


>>>>I have a class based on textBox that is used on various forms. Is there a way to determine the row and column screen postion of the class when it gets focus ?
>>>>
>>>>Thanks CB
>>>
>>>Actually, you can check left,top properties of the object instanciated from this class.
>>
>>Wouldn't that give me left, top in relation to container, instead of the screen ?
>
>Yes, but assuming that you have container properties too, the problem doesn't seem too complicated.
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform