Results 1 to 2 of 2

Thread: Line Number Textbox/Richtextbox?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    106

    Line Number Textbox/Richtextbox?

    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~!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Line Number Textbox/Richtextbox?

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width