Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Position in a Memo field (part 2)
Message
From
20/11/2008 12:37:51
 
 
To
20/11/2008 12:35:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01363222
Message ID:
01363239
Views:
10
I tested it, and this should give you a good start.
*Gotfocus:
Local lnStart
this.AddProperty('cPretext','')
lnStart=At('4',cText) && cText is the initial text
this.cpretext=Left(cText,lnStart-1)
this.value=Substr(cText,lnStart)
*Lostfocus:
this.Value=this.cPretext+this.Value
cText=this.value
>Thanks for all the feedback Tore.
>
>>I don't think you will fine any easier solution, and it should be very easy to implement it this way.
>>
>>>So no better way huh?
>>>
>>>I mean nothing provided directly by VFP?
>>>
>>>I guess that sometimes I ask too much from that good 'ol VFP ;-)
>>>
>>>>I described that also in my other email. In gotfocus, you must separate the first part of the text, and put it in a variable. The rest is used at the value for the editbox. In the lostfocus you add the two pieces together again.
>>>>
>>>>>I have this in an EditBox
>>>>>
>>>>>1
>>>>>2
>>>>>3
>>>>>4
>>>>>=========
>>>>>5
>>>>>6
>>>>>7
>>>>>
>>>>>I'm able to position the cursor at the 5 when the user gives focus to the editbox. How could I make it that the 5 appears at the top of the editbox?
>>>>>
>>>>>so the user would see
>>>>>
>>>>>5
>>>>>6
>>>>>7
Previous
Reply
Map
View

Click here to load this message in the networking platform