CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Location
    Japan
    Posts
    146

    Line numbers- I am tired

    Is there any way to put line number in the
    left margin of the richtextbox.??

    How to write the line numbers in the Richtextbox margins?

    How all text editors implement the line number option?

    I tried lot but nothing worked out.

    any code snippets in any language would be
    appreciated.

    "They can because they think they can" - Voltaire.

  2. #2
    Join Date
    Jul 2003
    Posts
    54
    You must do it yourself. You can code for manual dealing with that problem.
    You may do it in the RTB Control, or you can create a list box do write line number into it ( i think it is easy to do than write directly in the rich text box ).
    Or you can make yourself a new ActiveX ( or User Control ).

    Best Regards.

  3. #3
    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    762
    You could always format the RichTextBox yourself. When a new line is created, put it in the textbox and add a tab and let the user type after that.

    Might be more of a pain doing it that way but it might give the desired effect.

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

Featured