How to add line numbers to source code or text

  • Thread starter Thread starter Susan Baker
  • Start date Start date
Tools -> Options -> Text Editor -> All Languages -> Display:- Line
Numbers

Thats not in code though, just displays the line number in a column to
the left.

Steven Nagy
 
Steven said:
Tools -> Options -> Text Editor -> All Languages -> Display:- Line
Numbers

Thats not in code though, just displays the line number in a column to
the left.

Steven Nagy

Sorry, should have made myself more clear. I am writing a source code
editor, and I want to know how to extend (possibly a RichText control),
or maybe build a user control that allows me to display line numbers for
the lines of code that has been loaded into the RichText control.

Hopefully, sonmeone may have written this (or something similar) before
- or come accross something similar - and this will help me avoid
re-inventing the wheel.
 
Susan said:
Sorry, should have made myself more clear. I am writing a source code
editor, and I want to know how to extend (possibly a RichText control),
or maybe build a user control that allows me to display line numbers for
the lines of code that has been loaded into the RichText control.

Hopefully, sonmeone may have written this (or something similar) before
- or come accross something similar - and this will help me avoid
re-inventing the wheel.

I wouldn't recommend you to re-invent a wheel - look at
ICSharpCode.TextEditor class from developers of SharpBuilder. This class
is provided free of charge with full source code. It supports code
highlightning, intellisence and many other sweet goodies.

I use it for my SQL script editor app.
You can start from here:
http://www.icsharpcode.net/Opensource/SD/forum/topic.asp?TOPIC_ID=7791

Hope it helps,
MuZZy
 
Hi,

Susan Baker said:
Any one knows how to do this? I am using VC7.1 on .Net 1.1

Just remember that this is a C# group, not devoted to VC ++
 
Back
Top