A
Anders
I need to create a "text-object" for a drawing
application. (comparable to AutoCad multiline text)
Nothing fancy, except that it needs to support tables
with right or decimal aligned number columns. The text
must be edited in a wysiwyg editor, and then rendered at
the correct location on the GDI+ graphics (screen/printer
drawing)
I have tried the RichTextBox control, but it doesn't seem
versatile enough. My questions are:
1. How do I use the RichTextBox control to edit and then
subsequently paint the formatted text onto other GDI+
surfaces? The only solution I have seen is using some
interop hack to call the FormatRange function, can't it
be done without interop?
2. With or without interop: how do I make sure the
resolutions get correct on the render surface of the
FormatRange? Do I have to use another interop call to set
the render resolution?
3. Which is the easiest way to make a table with a right
aligned column? Is it even supported? I hear
AdvancedTypography can be enabled by yet another interop
call to give right aligned tabs (but how do I control
them in the RichTextBox? will they work as right-flush
tabs correctly in edit?). Does the RichTextBox support
any rtf "tables"?
4. If I give up on the RichTextBox, what oher methods are
recommended? Using the 10mb mshtml lib for displaying
some formatted text and simple tables feels a bit
overkill.
Any help is greatly appreciated.
application. (comparable to AutoCad multiline text)
Nothing fancy, except that it needs to support tables
with right or decimal aligned number columns. The text
must be edited in a wysiwyg editor, and then rendered at
the correct location on the GDI+ graphics (screen/printer
drawing)
I have tried the RichTextBox control, but it doesn't seem
versatile enough. My questions are:
1. How do I use the RichTextBox control to edit and then
subsequently paint the formatted text onto other GDI+
surfaces? The only solution I have seen is using some
interop hack to call the FormatRange function, can't it
be done without interop?
2. With or without interop: how do I make sure the
resolutions get correct on the render surface of the
FormatRange? Do I have to use another interop call to set
the render resolution?
3. Which is the easiest way to make a table with a right
aligned column? Is it even supported? I hear
AdvancedTypography can be enabled by yet another interop
call to give right aligned tabs (but how do I control
them in the RichTextBox? will they work as right-flush
tabs correctly in edit?). Does the RichTextBox support
any rtf "tables"?
4. If I give up on the RichTextBox, what oher methods are
recommended? Using the 10mb mshtml lib for displaying
some formatted text and simple tables feels a bit
overkill.
Any help is greatly appreciated.