wxrichtextctrl reading/writing to file?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
davidlondonuk
In need of some credit
In need of some credit
Posts: 8
Joined: Mon May 21, 2018 6:58 am

wxrichtextctrl reading/writing to file?

Post by davidlondonuk » Sat Jul 28, 2018 10:42 am

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.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2066
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxrichtextctrl reading/writing to file?

Post by PB » Sat Jul 28, 2018 1:39 pm

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

Post Reply