]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/wxPIA_book/Chapter-16/html_window_loadpage.py
Added the sample code from wxPython In Action to the samples dir
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-16 / html_window_loadpage.py
diff --git a/wxPython/samples/wxPIA_book/Chapter-16/html_window_loadpage.py b/wxPython/samples/wxPIA_book/Chapter-16/html_window_loadpage.py
new file mode 100644 (file)
index 0000000..5789ce4
--- /dev/null
@@ -0,0 +1,17 @@
+import wx
+import wx.html
+
+class MyHtmlFrame(wx.Frame):
+    def __init__(self, parent, title):
+        wx.Frame.__init__(self, parent, -1, title, size=(600,400))
+        html = wx.html.HtmlWindow(self)
+        if "gtk2" in wx.PlatformInfo:
+            html.SetStandardFonts()
+
+        wx.CallAfter(
+            html.LoadPage, "http://wxwidgets.org/manuals/2.6.2/wx_wxbutton.html")
+
+app = wx.PySimpleApp()
+frm = MyHtmlFrame(None, "Simple HTML Browser")
+frm.Show()
+app.MainLoop()