473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to add line numbers to source code or text

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

Thanks

Dec 19 '05 #1
4 2378
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

Dec 19 '05 #2


Steven Nagy wrote:
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.

Dec 19 '05 #3
Susan Baker wrote:


Steven Nagy wrote:
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.


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/Opensourc...?TOPIC_ID=7791

Hope it helps,
MuZZy
Dec 19 '05 #4
Hi,

"Susan Baker" <sb****@no.spam.net> wrote in message
news:do**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
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 ++

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Dec 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: FrancisC | last post by:
#include <stdio.h> int file_copy( char *oldname, char *newname ); int main() { char source, destination; printf("\nEnter source file: ");
3
by: Jan E Andersen | last post by:
Is there an option for this It woul certainly make debugging much easier JE
11
by: Leon | last post by:
I have six textbox controls on my webform that allows the user to enter any numbers from 1 to 25 in any order. However, I would like to sort those numbers from least to greatest before sending them...
3
by: Jim Bancroft | last post by:
Hi all, In VB6 I used a 3rd party tool for line numbering my source code, to help with debugging. However, in experimenting with VB .Net I've noticed that my exceptions automatically provide...
4
by: J L | last post by:
Are there any free add-ins for VB.Net that will add and remove line numbers from the source code? TIA John
4
by: Water Cooler v2 | last post by:
Besides embedding <BR/>, like general purpose programming languages, I thought you could embed escape sequences such as \n or \r\n into string arguments to cause line breaks in JavaScript. To...
4
by: Ravi, Dallas, Texas | last post by:
http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic22503.aspx shows ways to get errors in a server context. i am trying to find ways to trap the line number where...
18
by: W. Watson | last post by:
See Subject. It's a simple txt file, each line is a Python stmt, but I need up to four digits added to each line with a space between the number field and the text. Perhaps someone has already done...
53
by: Gianni Mariani | last post by:
Do you have a preference on maximum line width for C++ code? I've seen the craziest debates on this most silly of topic. I have witnessed engineers spent oodles of time fiddling with line...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.