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.
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