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

Exactly what I was looking for. Thanks.

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
>
Liam O'Hagan
MCP VFP Desktop Apps
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform