Hi,

Is it possible to save the contents of a RichTextCtrl with the formatting?

I'm writing a text editor to learn wxpython and when I use the SaveFile method it saves the data as plain text. PrintFile works the same.

Doug

Recommended Answers

All 2 Replies

wx.TextCtrl(panel,-1,style=wx.TE_MULTILINE|wx.TE_RICH2)

wxpython will save textctrl as text format. It will keep basic formating like indentaions,spaces, etc.

But to save to doc,docx or other format. You will have to convert to that format.
;)

Ok, well that is disappointing because I made a very powerful and useless editor. However, the purpose was to learn to write a GUI in wxpython and I accomplished that goal. I like wxpython a lot more than tkinter, now.
Thanks,
Doug

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.