
Jump to line in richtextbox
Quote:
>All you have to do is use the SelStart property to move the cursor.
>> Hi,
>> Does anyone know how to place the insertion point(textcursor) to line n
in
>a
>> richtextbox. My guess is using window api calls but I don't know much of
>> them.
>> Thanks
>> DrWizard
I know that SelStart should be used, but perhaps I haven't described my
problem properly. If a user has typed, lets's say a 1000 lines of text in
the textbox and I want to jump to line 500, I don't know where line 500
starts in the richtextbox.
You can't tell SelStart to go to line 500 directly. First you have to
determine at what position line 500 starts in the textbox and then do
something like : object.SelStart = position of start of line 500
Thanks
DrWizard