1
2        def OnAbout(self, event):
3
4            bcur = wx.BeginBusyCursor()
5
6            wx.FileSystem.AddHandler(wx.MemoryFSHandler)
7            wx.MemoryFSHandler.AddFile("logo.pcx", wx.Bitmap("logo.pcx", wx.BITMAP_TYPE_PCX))
8            wx.MemoryFSHandler.AddFile("about.htm",
9                                       "<html><body>About: "
10                                       "<img src=\"memory:logo.pcx\"></body></html>")
11
12            dlg = wx.Dialog(self, -1, _("About"))
13
14            topsizer = wx.BoxSizer(wx.VERTICAL)
15
16            html = wx.html.HtmlWindow(dlg, size=wx.Size(380, 160), style=wx.HW_SCROLLBAR_NEVER)
17            html.SetBorders(0)
18            html.LoadPage("memory:about.htm")
19            html.SetSize(html.GetInternalRepresentation().GetWidth(),
20                         html.GetInternalRepresentation().GetHeight())
21
22            topsizer.Add(html, 1, wx.ALL, 10)
23            topsizer.Add(wx.StaticLine(dlg, -1), 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 10)
24            topsizer.Add(wx.Button(dlg, wx.ID_OK, "Ok"),
25                         0, wx.ALL | wx.ALIGN_RIGHT, 15)
26
27            dlg.SetAutoLayout(True)
28            dlg.SetSizer(topsizer)
29            topsizer.Fit(dlg)
30            dlg.Centre()
31            dlg.ShowModal()
32
33            wx.MemoryFSHandler.RemoveFile("logo.pcx")
34            wx.MemoryFSHandler.RemoveFile("about.htm")
35
36