Answering follow-up Question after the picture was submitted:
You certainly did not explain it properly in first place. What you show on the picture (thank you, you finally answered my questions by this post, but you better put in in your Question)... this is what was my last guess in our guesswork with Venkatesh. Too bad you came back that late, so all we did was guesswork.
Of course, it is possible, but this presentation if
far, really far away from existing rich text functionality. I'm almost 100% much sure the UI you show is not based on rich text. Best thing to do would be to create a brand new editor code. I'm not joking, because I know what other teams did (not for the sake of you highlight but for more serious reasons). If you really would like to bite a bullet, please look at the editor implementation in Sharp develop:
http://en.wikipedia.org/wiki/SharpDevelop[
^],
http://sharpdevelop.com/[
^] — full source code is available.
You can still want to use
RichTextBox
, this would be <d>very difficult. This component is strongly text-oriented. Even finding a relative coordinate in the scrolled area is difficult, because all measurements are done in character positions, and all characters and lines are of different sizes (this problem is solvable in WPF though). So first big problem will be just to find coordinates of you horizontal strip. How about width? You will have to locate the text line and calculate its bounding size. And rendering of this thing is a real nightmare. You cannot just put a control on top of the
RichTextBox
would block your mouse/keyboard interaction with the text. Low-level rendering in
RichTextBox
? Even if you do this, how can it interact with all changes in the line underneath? And so on. I would more easily write a brand new edit component…
Do you really want to break your teeth on this problem? I would suggest you spend your time on something more useful.
—SA