Well how can I get line numbers for a Textbox/Richtextbox? I also want it so when I click on a line number it will select that entire line? Thanks~!
Printable View
Well how can I get line numbers for a Textbox/Richtextbox? I also want it so when I click on a line number it will select that entire line? Thanks~!
http://www.vbforums.com/showthread.php?t=417602
As for selecting a whole line, you'll have to handle the Click event, determine what line you're on, calculate the start and end index of that line, then set the SelectionStart and SelectionLength accordingly. My code should give you some ideas on that. Check out the documentation for the RichTextBox to see what members it has and then give it a go. If you have trouble, post back and show us what you've done so far.