Page 1 of 1

wxrichtextctrl reading/writing to file?

Posted: Sat Jul 28, 2018 10:42 am
by davidlondonuk
Hi,
I cannot work out how you use wxrichtextctrl to read from a file or write back to that file when a user edits a section of richtext.

I'm coding a simple flash-card learning program, I have it working with plain text (read from a file and displayed in a wxtextctrl) , but I don't get how you read and write back the xml for the richtextctrl. I have downloaded the richtext sample but still can't figure it out.

To save me a lot of hair pulling, could some someone point me in the right direction.

Thanks for any help.

Re: wxrichtextctrl reading/writing to file?

Posted: Sat Jul 28, 2018 1:39 pm
by PB
What about its LoadFile() and SaveFile() methods (using wxRICHTEXT_TYPE_XML)?

Sorry for stating the obvious, but you do know that there is an official documention for wxWidgets?
E.g. for wxRichTextCtrl it is here: http://docs.wxwidgets.org/trunk/classwx ... _ctrl.html