13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>wxPython</strong> dialogshttp://www.zetcode.com/wxpython/dialogs/About dialog boxAlmost every application has a typical about dialog box. It is usuallyplaced in the Help menu. <strong>The</strong> purpose of this dialog is to give theuser the basic information about the name and the version of theapplication. In the past, these dialogs used to be quite brief. <strong>The</strong>sedays most of these boxes provide additional information about theauthors. <strong>The</strong>y give credits to additional programmers ordocumentation writers. <strong>The</strong>y also provide information about theapplication licence. <strong>The</strong>se boxes can show the logo of the company orthe application logo. Some of the more capable about boxes showanimation. <strong>wxPython</strong> has a special about dialog box starting from2.8.x series. It is not rocket science to make such a dialog manually.But it makes a programmer's life easier.<strong>The</strong> dialog box is located in the Misc module. In order to create anabout dialog box we must create two objects. A wx.AboutDialogInfoand a wx.AboutBox.wx.AboutDialogInfo()We will call the following methods upon a wx.AboutDialogInfo objectin our example. <strong>The</strong>se methods are self-exlanatory.MethodSetName(string name)SetVersion(string version)SetDescription(string desc)SetCopyright(string copyright)SetLicence(string licence)SetIcon(wx.Icon icon)SetWebSite(string URL)SetLicence(string licence)Descriptionset the name of the programset the version of the programset the description of the programset the copyright fo the programset the licence of the programset the icon to be showset the website of the programset the licence of the program5 de 11 27/04/2008 1:04

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!