Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Position in a Memo field
Message
From
19/11/2008 16:59:27
 
 
To
19/11/2008 16:41:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01362935
Message ID:
01362990
Views:
11
This message has been marked as the solution to the initial question of the thread.
Maybe this is better
nodefault
this.selstart=at('4',this.value)
dodefault()
>Your code does not place the cursor at the right place. The cursor is always positioned at the place it was last positioned when exiting that field.
>
>>My code should place the cursor at the right place, but do you also want to hide the text before the desired position? If so, I guess you must store the first part of the old value in a variable in the gotfocus event, use the last part as value for the editbox and in lostfocus you must add the two parts together again.
>>
>>>That does'nt work
>>>
>>>>Soemthing like
>>>>*gotfocus:
>>>>this.selstart=at('4',this.value)
>>>>
>>>>
>>>>>Have en edit box in a form. Memo field
>>>>>
>>>>>How do I position the cursor so that the user sees the content of that memo field starting with the occurence of a string of character.
>>>>>
>>>>>For example:
>>>>>
>>>>>Field contains
>>>>>
>>>>>1
>>>>>2
>>>>>3
>>>>>====
>>>>>4
>>>>>5
>>>>>6
>>>>>7
>>>>>8
>>>>>
>>>>>I want the user to see the data starting at 4 in the memo field.
>>>>>
>>>>>I guess that SelStart and SelLengtn are involved here
>>>>>
>>>>>But what next?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform