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/def ShowMessage(self):wx.MessageBox('Download completed', 'Info')wx.MessageBox shows a small dialog window. We provide threeparameters. <strong>The</strong> text message, the title message and finally thebutton.Figure: A message dialogPredefined dialogs<strong>wxPython</strong> has several predefined dialogs. <strong>The</strong>se are dialogs forcommon programming tasks like showing text, receiving input ,loading and saving files etc.Message dialogsMessage dialogs are used to show messages to the user. <strong>The</strong>y aremore flexible than simple message boxes, that we saw in theprevious example. <strong>The</strong>y are customizable. We can change icons andbuttons that will be shown in a dialog.wx.MessageDialog(wx.Window parent, string message, string caption=wx.MessageBoxCaptionStlong style=wx.OK | wx.CANCEL | wx.CENTRE, wx.Point pos=(-1, -1))flagwx.OKwx.CANCELwx.YES_NOmeaningshow Ok buttonshow Cancel buttonshow Yes, No buttons2 de 11 27/04/2008 1:04

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

Saved successfully!

Ooh no, something went wrong!