473,725 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2402
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.Tex tEditor 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
4096
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
2129
by: Jan E Andersen | last post by:
Is there an option for this It woul certainly make debugging much easier JE
11
1945
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 to the database. How can accomplish this task? Thanks!
3
2934
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 line numbers, with no effort required from me. Is this a standard offering in .Net, or is rolling your own line numbers still the way to go? Also, my components at the moment are being compiled in debug mode. Will line numbers still be available...
4
2203
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
58506
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 test, I tried this: <BODY> <BR/><BR/>
4
1420
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 the code is failing in try catch set up. if i hard code the line number by looking at the IDE's editor, it will be soon out of date when i start modifying the code as needed. i want to let the users know on which line the application failed. if...
18
2438
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 this or there's a source on the web for it. I'm not yet into files with Python. A sudden need has burst upon me. I'm using Win XP. -- Wayne Watson (Nevada City, CA) Web Page: <speckledwithStars.net>
53
12127
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 breaks just to get it right. I find in general a prescriptive rule makes for markedly less readable code, which unfortunately is a subjective argument, however, the waste of time modifying code when it does not need to is not.
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8096
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4517
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4782
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2634
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.