]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/AboutBox.py
4 #----------------------------------------------------------------------
6 class TestPanel(wx
.Panel
):
7 def __init__(self
, parent
, log
):
9 wx
.Panel
.__init
__(self
, parent
, -1)
11 b
= wx
.Button(self
, -1, "Show a wx.AboutBox", (50,50))
12 self
.Bind(wx
.EVT_BUTTON
, self
.OnButton
, b
)
15 def OnButton(self
, evt
):
16 # First we create and fill the info object
17 info
= wx
.AboutDialogInfo()
18 info
.Name
= "Hello World"
19 info
.Version
= "1.2.3"
20 info
.Copyright
= "(C) 2006 Programmers and Coders Everywhere"
22 "A \"hello world\" program is a software program that prints out "\
23 "\"Hello world!\" on a display device. It is used in many introductory "\
24 "tutorials for teaching a programming language. Such a program is "\
25 "typically one of the simplest programs possible in a computer language. "\
26 "A \"hello world\" program can be a useful sanity test to make sure that "\
27 "a language's compiler, development environment, and run-time environment "\
28 "are correctly installed."
29 info
.WebSite
= ("http://en.wikipedia.org/wiki/Hello_world", "Hello World home page")
30 info
.Developers
= [ "Joe Programmer",
34 # Then we call wx.AboutBox giving it that info object
38 #----------------------------------------------------------------------
40 def runTest(frame
, nb
, log
):
41 win
= TestPanel(nb
, log
)
44 #----------------------------------------------------------------------
48 overview
= """<html><body>
49 <h2><center>wx.AboutBox</center></h2>
51 This function shows the native standard about dialog containing the
52 information specified in info. If the current platform has a native
53 about dialog which is capable of showing all the fields in info, the
54 native dialog is used, otherwise the function falls back to the
55 generic wxWidgets version of the dialog.
62 if __name__
== '__main__':
65 run
.main(['', os
.path
.basename(sys
.argv
[0])] + sys
.argv
[1:])