Click here to Skip to main content
14,664,481 members
Rate this:
Please Sign up or sign in to vote.
See more:
How to show line number on the left side of a rich text box in each line as in komodo editor?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

To best of my knowledge, this component is not capable of doing that. To do it right, the line numbers should not be part of text, they should not be included in selection, copied to clipboard, etc.

All the advanced components I saw were not based on standard Windows classes. There are either made from scratch based on the Control class or implemented as a raw (unmanaged) Windows window and used in .NET via P/Invoke.

You can find a good example of such advanced editor created from scratch in the source code of MonoDevelop, see[^],[^].

If I'm not much mistaken, the editor of the latest MonoDevelop version is implemented in WPF, but you can also find an older editor based on Forms in legacy MonoDevelop source code. These editors are totally independent from MonoDevelop, they are separate components.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100