[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

How to make an editor with line number

Hi, in visual studio, when you show line number, you can see that the line number column is uneditable, and the line number column can be scroll with the text. Furthermore, the line number increase and decrease according to the typing of user.

I wish to build such an editor using visual studio(C#), but I am not sure which component to use, and how to achieve that. Can anyone shed me some light?
0
william007
Asked:
william007
  • 2
2 Solutions
 
srinivasbnCommented:
Hi

I have a solution to do the editor. You can't do it normal text editors. But you can do the same using the datagrid control. Use 1st column as display numbers and in the second column the text what you want to display or enter.

Suppose you are entering the text and after finishing the line you click on enter key then automatically it should add the new row and place the control at the new row second column.
Write the code when ever the new row is inserted then automatically you should add then new line number.

I think this will solve your problem
0
 
Jaime OlivaresSoftware ArchitectCommented:
there are some free ready-made custom controls at codeproject.com, like:
http://www.codeproject.com/KB/edit/numberedtextbox.aspx
0
 
Jaime OlivaresSoftware ArchitectCommented:
0
 
william007Author Commented:
Thank :)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now