Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox
Message
From
16/04/2000 06:18:39
Liam O'Hagan
O'Hagan Programming Ltd
Ireland
 
 
To
16/04/2000 06:09:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00360078
Message ID:
00360109
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform