13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>wxPython</strong> dialogshttp://www.zetcode.com/wxpython/dialogs/def __init__(self, parent, id, title):wx.Dialog.__init__(self, parent, id, title, size=(250, 210))In our code example we create a custom ChangeDepth dialog. Weinherit from a wx.Dialog widget.chgdep = ChangeDepth(None, -1, 'Change Color Depth')chgdep.ShowModal()chgdep.Destroy()We instantiate a ChangeDepth class. <strong>The</strong>n we call the ShowModal()dialog. We must not forget to destroy our dialog. Notice the visualdifference between the dialog and the top level window. <strong>The</strong> dialog inthe following figure has been activated. We cannot work with thetoplevel window until the dialog is destroyed. <strong>The</strong>re is a cleardifference in the titlebar of the windows.Figure: A custom dialogPython Purse on saleGenuine python handbags on sale WeCustom make handbag for youTT-SolutionswxWidgets (wxWindows) consulting anddevelopment. Ask the wxExperts!Home ‡ Contents ‡ Top of Page10 de 11 27/04/2008 1:04

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

Saved successfully!

Ooh no, something went wrong!