Help with RichTextCtrl.Refresh() and self.Layout()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thebigonions
    New Member
    • Apr 2014
    • 2

    Help with RichTextCtrl.Refresh() and self.Layout()

    Hello,
    I have a RichTextCtrl on my panel that I am trying to show some rich text in. I have read in the rich text in HTML format. I am using a MVC format so my view (RichTextCtrl) is in separate code from my controller. In my controller I am trying:

    Code:
    out = StringIO()
    handler = rt.RichTextXMLHandler()
    buffer = self.view.rtEditor.GetBuffer()
    buffer.AddHandler(handler)
    out.wirte(content)
    out.seek(0)
    handler.LoadStream(buffer, out)
    self.view.rtEditor.Refresh()
    self.view.Layout()
    My questions are: What does the Refresh() do? And why can't I find any documentation on it? What does Layout() do? And why can't I find any documentation on it? And most importantly, why doesn't my text show up in my RichTextCtrl? I have tried this in a python app without MVC and it works fine.

    Thank you.
    Last edited by Rabbit; Apr 28 '14, 03:45 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • thebigonions
    New Member
    • Apr 2014
    • 2

    #2
    Ok, the problem is that I was saving my text as HTML. I changed it to save as XML, now I can read it in as Rich Text.

    Comment

    Working...