]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-16/html_window_related.py
fixed deadlock when calling wxPostEvent() from worker thread
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-16 / html_window_related.py
1 import wx
2 import wx.html
3
4 class MyHtmlFrame(wx.Frame):
5 def __init__(self, parent, title):
6 wx.Frame.__init__(self, parent, -1, title, size=(600,400))
7 self.CreateStatusBar()
8
9 html = wx.html.HtmlWindow(self)
10 if "gtk2" in wx.PlatformInfo:
11 html.SetStandardFonts()
12 html.SetRelatedFrame(self, self.GetTitle() + " -- %s")
13 html.SetRelatedStatusBar(0)
14
15 wx.CallAfter(
16 html.LoadPage, "http://wxwidgets.org/manuals/2.6.2/wx_wxbutton.html")
17
18 app = wx.PySimpleApp()
19 frm = MyHtmlFrame(None, "Simple HTML Browser")
20 frm.Show()
21 app.MainLoop()