Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting Editbox's Line and Column position
Message
 
 
To
02/02/2009 11:39:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01378690
Message ID:
01378787
Views:
20
>>Something like
>>
>>lnStart = Thisform.Edit1.SelStart
>>lcCrLf = CHR(13) + CHR(10)
>>
>>lnOccurence = OCCURS(lcCrLf, LEFT(Thisform.Edit1.Text, lnStart))
>>
>>lcCommand = STREXTRACT(lcCrLf + Thisform.Edit1.Text, lcCrLf ,lcCrLf, lnOccurence + 1,2) 
>>
>>
>only you Sergey.. only you
>
>cool.. so cool... but a little something leaking... the control of [;] character per line to deal with long commands
>
>now... I'm trying to deal with that

You can also try ALINES(). It may be even easier and faster.
lnStart = Thisform.Edit1.SelStart
lcCrLf = CHR(13) + CHR(10)

lnOccurence = OCCURS(lcCrLf, LEFT(Thisform.Edit1.Text, lnStart))

ALINES(laLines, Thisform.Edit1.Text)
lcCommand = laLines[lnOccurence + 1]
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform