]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/About.py
Added GetListView accessor
[wxWidgets.git] / wxPython / demo / About.py
CommitLineData
1e4a197e 1import sys
e166644c 2
1fded56b
RD
3import wx # This module uses the new wx namespace
4import wx.html
5import wx.lib.wxpTag
e166644c
RD
6
7#---------------------------------------------------------------------------
8
1fded56b 9class MyAboutBox(wx.Dialog):
e166644c
RD
10 text = '''
11<html>
12<body bgcolor="#AC76DE">
2f90df85
RD
13<center><table bgcolor="#458154" width="100%%" cellspacing="0"
14cellpadding="0" border="1">
e166644c 15<tr>
c368d904
RD
16 <td align="center">
17 <h1>wxPython %s</h1>
18 Running on Python %s<br>
19 </td>
e166644c
RD
20</tr>
21</table>
22
23<p><b>wxPython</b> is a Python extension module that
24encapsulates the wxWindows GUI classes.</p>
25
26<p>This demo shows off some of the capabilities
27of <b>wxPython</b>. Select items from the menu or tree control,
28sit back and enjoy. Be sure to take a peek at the source code for each
29demo item so you can learn how to use the classes yourself.</p>
30
31<p><b>wxPython</b> is brought to you by <b>Robin Dunn</b> and<br>
1fded56b 32<b>Total Control Software,</b> Copyright (c) 1997-2003.</p>
e166644c 33
2f90df85
RD
34<p>
35<font size="-1">Please see <i>license.txt</i> for licensing information.</font>
36</p>
e166644c 37
1fded56b 38<p><wxp module="wx" class="Button">
e166644c 39 <param name="label" value="Okay">
1fded56b 40 <param name="id" value="ID_OK">
e166644c
RD
41</wxp></p>
42</center>
43</body>
44</html>
45'''
46 def __init__(self, parent):
1fded56b
RD
47 wx.Dialog.__init__(self, parent, -1, 'About the wxPython demo',)
48 html = wx.html.HtmlWindow(self, -1, size=(420, -1))
14fb0a9f
RD
49 if "gtk2" in wx.PlatformInfo:
50 html.NormalizeFontSizes()
1e4a197e 51 py_version = sys.version.split()[0]
1fded56b
RD
52 html.SetPage(self.text % (wx.VERSION_STRING, py_version))
53 btn = html.FindWindowById(wx.ID_OK)
c368d904 54 ir = html.GetInternalRepresentation()
1e4a197e 55 html.SetSize( (ir.GetWidth()+25, ir.GetHeight()+25) )
c368d904 56 self.SetClientSize(html.GetSize())
1fded56b 57 self.CentreOnParent(wx.BOTH)
e166644c
RD
58
59#---------------------------------------------------------------------------
2f90df85
RD
60
61
62
1fded56b
RD
63if __name__ == '__main__':
64 app = wx.PySimpleApp()
65 dlg = MyAboutBox(None)
66 dlg.ShowModal()
67 dlg.Destroy()
68 app.MainLoop()
2f90df85 69