winforms - How can I scroll to a specified line number of a RichTextBox control using C#? -


how can scroll specified line number of richtextbox control using c#? it's winforms version.

you can try this.

    void scrolltoline(int linenumber)     {         if (linenumber > richtextbox1.lines.count()) return;          richtextbox1.selectionstart = richtextbox1.find(richtextbox1.lines[linenumber]);         richtextbox1.scrolltocaret();     } 

this not work if have lots of repetition within richtextbox. hope might of use you.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -