Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How do you show line numbers in a RichTextBox control?

How do you show line numbers in a RichTextBox control?

Scheduled Pinned Locked Moved C#
visual-studioquestion
14 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Sinani201

    Hello. I'm trying to make an IDE for a seperate programming language called DarkBASIC. Everything is going perfectly fine, but I'm trying to be able to show line numbers in the editor, which is a RichTextBox control. So is there a way to show the line numbers in a RichTextBox control? And if there isn't, is there an alternative?

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #2

    Line Numbering of RichTextBox in .NET 2.0[^]

    S 1 Reply Last reply
    0
    • L Lost User

      Line Numbering of RichTextBox in .NET 2.0[^]

      S Offline
      S Offline
      Sinani201
      wrote on last edited by
      #3

      I don't get it...

      Y 1 Reply Last reply
      0
      • S Sinani201

        Hello. I'm trying to make an IDE for a seperate programming language called DarkBASIC. Everything is going perfectly fine, but I'm trying to be able to show line numbers in the editor, which is a RichTextBox control. So is there a way to show the line numbers in a RichTextBox control? And if there isn't, is there an alternative?

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #4

        ddawftwgvufyg eui wrote:

        is there a way to show the line numbers in a RichTextBox control?

        Not built-in AFAIK, but you can certainly add line numbers to the control's text. Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        1 Reply Last reply
        0
        • S Sinani201

          I don't get it...

          Y Offline
          Y Offline
          Yusuf
          wrote on last edited by
          #5

          ddawftwgvufyg eui wrote:

          I don't get it...

          you did not get what? you did not get the link, it works. You wanted working code, well the article explains it. So what is that you did not get?

          Yusuf

          M S 2 Replies Last reply
          0
          • Y Yusuf

            ddawftwgvufyg eui wrote:

            I don't get it...

            you did not get what? you did not get the link, it works. You wanted working code, well the article explains it. So what is that you did not get?

            Yusuf

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #6

            It's VB code - It makes C[...] programmers' eyes bleed. ;P

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            Y 1 Reply Last reply
            0
            • Y Yusuf

              ddawftwgvufyg eui wrote:

              I don't get it...

              you did not get what? you did not get the link, it works. You wanted working code, well the article explains it. So what is that you did not get?

              Yusuf

              S Offline
              S Offline
              Sinani201
              wrote on last edited by
              #7

              Oh, nevermind. I didn't know that it was a link.

              Y 1 Reply Last reply
              0
              • S Sinani201

                Oh, nevermind. I didn't know that it was a link.

                Y Offline
                Y Offline
                Yusuf
                wrote on last edited by
                #8

                :wtf: :omg: :wtf: :omg: :wtf: :wtf: :omg:

                Yusuf

                P 1 Reply Last reply
                0
                • Y Yusuf

                  :wtf: :omg: :wtf: :omg: :wtf: :wtf: :omg:

                  Yusuf

                  P Offline
                  P Offline
                  Paul Conrad
                  wrote on last edited by
                  #9

                  :laugh: I guess the OP has never seen a link before. :suss:

                  "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                  1 Reply Last reply
                  0
                  • S Sinani201

                    Hello. I'm trying to make an IDE for a seperate programming language called DarkBASIC. Everything is going perfectly fine, but I'm trying to be able to show line numbers in the editor, which is a RichTextBox control. So is there a way to show the line numbers in a RichTextBox control? And if there isn't, is there an alternative?

                    N Offline
                    N Offline
                    Nicholas Butler
                    wrote on last edited by
                    #10

                    You could use the code text editor from SharpDevelop. It's packaged to be used separately. http://wiki.sharpdevelop.net/Using%20the%20texteditor.ashx[^] I used it for editing HTML in this[^] article, if you want to see an example.

                    ---------------------------------- Be excellent to each other :)

                    S 1 Reply Last reply
                    0
                    • M Mark Salsbery

                      It's VB code - It makes C[...] programmers' eyes bleed. ;P

                      Mark Salsbery Microsoft MVP - Visual C++ :java:

                      Y Offline
                      Y Offline
                      Yusuf
                      wrote on last edited by
                      #11

                      not big fan of VB[] either, at least, I am not afraid of playing with it though! :-\

                      Yusuf

                      1 Reply Last reply
                      0
                      • N Nicholas Butler

                        You could use the code text editor from SharpDevelop. It's packaged to be used separately. http://wiki.sharpdevelop.net/Using%20the%20texteditor.ashx[^] I used it for editing HTML in this[^] article, if you want to see an example.

                        ---------------------------------- Be excellent to each other :)

                        S Offline
                        S Offline
                        Sinani201
                        wrote on last edited by
                        #12

                        The SharpDevelop code text editor didn't work for me. The other article worked well, although the line numbers would only update when I changed the text, instead of scrolling.

                        1 Reply Last reply
                        0
                        • S Sinani201

                          Hello. I'm trying to make an IDE for a seperate programming language called DarkBASIC. Everything is going perfectly fine, but I'm trying to be able to show line numbers in the editor, which is a RichTextBox control. So is there a way to show the line numbers in a RichTextBox control? And if there isn't, is there an alternative?

                          C Offline
                          C Offline
                          Cruel Handsome
                          wrote on last edited by
                          #13

                          hai whats up!!!!!!!!!!! Can u tell me about the operating system before Vista other than XP

                          S 1 Reply Last reply
                          0
                          • C Cruel Handsome

                            hai whats up!!!!!!!!!!! Can u tell me about the operating system before Vista other than XP

                            S Offline
                            S Offline
                            Sinani201
                            wrote on last edited by
                            #14

                            That is unrelated to the question. How can I delete it?

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups