~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to wxPython/samples/wxPIA_book/Chapter-16/html_window_loadpage.py

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
        html = wx.html.HtmlWindow(self)
 
8
        if "gtk2" in wx.PlatformInfo:
 
9
            html.SetStandardFonts()
 
10
 
 
11
        wx.CallAfter(
 
12
            html.LoadPage, "http://wxwidgets.org/manuals/2.6.2/wx_wxbutton.html")
 
13
 
 
14
app = wx.PySimpleApp()
 
15
frm = MyHtmlFrame(None, "Simple HTML Browser")
 
16
frm.Show()
 
17
app.MainLoop()