I’m trying to create a rich text DataGridViewCell. I can host a RichTextBox as the editing control, but when the cell isn’t in editing mode I need to paint the rich text myself. I don’t want to parse the text – I just need an equivalent of Graphics.DrawString that works with rich text.
Share
Here’s an example where you can add a print feature to the richtextbox. It’s basically just copying the rich text to the Graphics object used for printing. I think you could modify this to use your own graphics object instead, and basically “print” to an image.
Edit:
Here’s a post where someone seems to have modified the print code for creating an image.