Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move to a line in the edit box.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00740238
Message ID:
00740515
Views:
14
An editbox do not have a property to return the line number.
But you can use the editbox.value to determine the correct position of the cursor.

Insert the value in an array with ALINES(testarray,EditBox.Value)
Count the characters while going to the line+char and set the selstart to this position.
*something like this, but you need to add some validations...

nLine=14
nPosition=18
ALINES(testarray,EditBox.Value)
StartPos=0
FOR i=1 to nLine-1
  StartPos=StartPos+len(testarray[i])
ENDFOR
StartPos=startpos+nPosition
EditBox.SelStart=StartPos
HTH :-)

>I'm making a little sql editor. How can I move to a specific line (even better position in an edit box?)
>
>For example if I have:
>line 14
>position 18
>
>I would like to jump to line 14 then 18 characters over.
>I guess I could use KEYBOARD but is there not a better way using the control
>properties?
>
>BR
>Tim
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform