Information générale
Catégorie:
Codage, syntaxe et commandes
Thanks George for the tip on OBJTOCLIENT(). I have experimented with it and came up with the following code in the GotFocusEvent of the TextBox.
The code could be made more generic by walking the chain of Parent BaseClasses to get the path to the object. In this (test) case the textbox is contained in a container along with a label which is then placed on the form.
Thanks again
LOCAL lnLeft, lnTop
lcObj = 'This.Parent.Parent' && FORM
loObj = EVAL(lcObj)
* Get the left of the form, then the parent container left, then the control
* itself. I added the This.Width to position mouse pointer a end of textbox
* for no particular reason.
lnLeft = OBJTOCLIENT(loObj, 2) + This.Parent.Left + This.Left + This.Width
lnTop = OBJTOCLIENT(loObj, 1) + This.Parent.Top + This.Top
MOUSE AT lnTop, lnLeft PIXELS
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement