Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SelStart Bug?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SelStart Bug?
Divers
Thread ID:
00589456
Message ID:
00589456
Vues:
73
Hi

Has anyone else noticed that the SelStart property is not updated properly when you use the Backspace key in an edtbox.

If I click in an editbox and check the SelStart value from the LostFocus event the value is correct. If I insert some text and then remove it with backspace key the selstart does no go back to the original value but returns the new value as if the new text was still in the control.

Therefore if I use from the Click event of a command button:
   This.Parent.editbox.value=Stuff(This.Parent.editbox.Value,This.Parent.editBox.selStart,0,"test")
The text is not inserted where I expected but further down the editbox.

I discovered this problem because I have a button on a form that inserts text into an edit box at the current cursor position. I use the method shown above.

Any suggestion how to fix this so that I can inserted the text at the current cursor position?

Thanks
Simon
Simon White
dCipher Computing
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform