Putting line numbers - TextArea


Is there any way for me to put line numbers of the Textarea in the left-most side?

there are many topics in this forum on this subject.
but it boils down to one of 3 things

  1. create your own custom class
  2. use the Custom Edit Field class
  3. or use FTC (Formatted Text Control?)

#1 is effort on your part
#2 is free and may or may not contain all the features you want
#3 is a nominal cost

but the direct answer to your question is… No

FTC FTW ! :smiley:

Thanks for the comments!

There is yet another easy way, at the condition that different font sizes not be used (like the example posted by Sascha) : place a second TextArea next to the main one, on the left, right justified, with the numbers, and synchronize it with ScrollPosition in a timer, or in the MouseWheel and Keydown events.

It is possible with different font sizes, but is requires a lot more work, since each line height has to be determined.

You could even do this with a single Listbox.

But sometimes time is more valuable then the success of having created your own solution :smiley: