By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,966 Members | 2,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,966 IT Pros & Developers. It's quick & easy.

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

P: 2
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:

Expand|Select|Wrap|Line Numbers
  1. out = StringIO()
  2. handler = rt.RichTextXMLHandler()
  3. buffer = self.view.rtEditor.GetBuffer()
  4. buffer.AddHandler(handler)
  5. out.wirte(content)
  6. out.seek(0)
  7. handler.LoadStream(buffer, out)
  8. self.view.rtEditor.Refresh()
  9. 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.
Apr 28 '14 #1
Share this Question
Share on Google+
1 Reply


P: 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.
Apr 29 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.