Page 1 of 1

RTF support for check-boxes

Posted: Tue Apr 24, 2012 4:38 am
by Mr Andreas
I understand the RTF standard has some basic support for check-boxes and some other basic objects without embedding external objects. Does TRichView support this, and, if so, how?

Posted: Tue Apr 24, 2012 2:13 pm
by Sergey Tkachenko
In TRichView, you can insert any Delphi control, including TCheckBox.
It can be saved in a native format (RVF). However, saving/reading controls to RTF is not implemented (you can implement saving yourself using OnSaveComponentToFile event)

Posted: Tue Apr 24, 2012 8:35 pm
by Mr Andreas
Sergey Tkachenko wrote:In TRichView, you can insert any Delphi control, including TCheckBox.
It can be saved in a native format (RVF). However, saving/reading controls to RTF is not implemented (you can implement saving yourself using OnSaveComponentToFile event)
Thank you Sergey, I suspected as much. Now I just have to figure out what RTF data I have to substitute in place of TCheckBox. Any idea?

The other question is, how do I reverse the process, i.e., load an RTF file which uses native check boxes and replace them with TCheckBox? Is there an appropriate event for this?

Posted: Wed Apr 25, 2012 10:00 am
by Sergey Tkachenko
Unfortunately - no, I am afraid it is not possible to implement using events. Later, RTF checkboxes will be supported.