Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional selecting in the TextBox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Conditional selecting in the TextBox
Divers
Thread ID:
00785262
Message ID:
00785262
Vues:
58
Hallo,

I'd like to implement the following behaviour in the textbox:

if thr textbox is entered with TAB or ENTER - then it must be selected. If it is entered with the mouse - then it must be only selected if the mouseclick succeeded in the filled part of the textbox or left to it (in the white space if the allignment is R).

With other words, I'd like to have a combination of what is described by Marcia Atkins for GotFocus

TextBox::GotFocus()
This.Selstart = 0
This.SelLength=LEN(this.Text)
NODEFAULT

and a "normal" behaviour with SelectOnEntry set to .t.

My problem is to find out the position of the mouse cursor relative to the text in the textbox as it clicks on the control. I've tried to retrieve the SelStart in GotFocus, but it seems to be always 0

Does anyone have some idea?

Thanks
Alexander Lerner
a_lerner@heinrich-schmid.de

The life is somewhat easier than it seems to be.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform