Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox
Message
De
16/04/2000 06:09:27
 
 
À
16/04/2000 06:02:45
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00360078
Message ID:
00360108
Vues:
11
Hi Liam.

>> I don't think there is a way to establish the current position in a text box or edit box but perhaps someone can tell me I'm wrong ? <<

OK. You're wrong ;-) Tetbox.SelStart is the current cursor position. If you have to save it, just add a custom property to your textbox called nLastPosition and initialize it to 0. Then, in the control's Valid, save .SelStart to .nLastPosition. In the GotFocus, just put something like this:
Textbox::GotFocus()
This.SelStart = This.nLastPosition
lnLen = LEN( TRANSORM( This.Value ) ) - This.SelStart
IF lnLen > 0
   This.SelLength = lnLen
ENDIF
NODEFAULT
This code is untested and off the top of my head, so you will need to test to see if it does what you require.

Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform