[wxpython-dev] wxPython access to RichTextCtrl
Petr Šimon
sim at klubko.net
Mon Mar 24 17:10:40 PDT 2008
Hello,
I am trying to control export of RichTextCtrl content, by defining named
styles and then looping over the nodes in the buffer, export each into
HTML that wouldn't be cluttered by too much mark up like font etc. and
also to be able to produce HTML that would have <h1> instead of
specified font. But I don't seem to be able to get lower that a paragraph.
buffer = myrichtextctrl.GetBuffer ()
nodes = buffer.GetChildren ()
for para in nodes:
print para
The paragraphs are wx.richtext.RichTextObject. I have also split the
paragraph by defining character styles. How do I get to the lower level
so I extract character style information?
I am doing this as a test so I understand how it works before I try to
write proper RichTextFileHandler.
Thanks
Petr
More information about the wxpython-dev
mailing list