473,698 Members | 2,344 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 2399
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
4095
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
2128
by: Jan E Andersen | last post by:
Is there an option for this It woul certainly make debugging much easier JE
11
1941
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
2933
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
58503
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
1419
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
2434
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
12113
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
8680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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
8899
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
8871
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
7738
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
6528
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
4371
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...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2335
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.