== Message Boxes == Use the wxMessage''''''Dialog class. Don't forget to {{{Destroy()}}} it when you're done. === Example === Some handy functions for common message box tasks: {{{ #!python def YesNo(parent, question, caption = 'Yes or no?'): dlg = wx.MessageDialog(parent, question, caption, wx.YES_NO | wx.ICON_QUESTION) result = dlg.ShowModal() == wx.ID_YES dlg.Destroy() return result def Info(parent, message, caption = 'Insert program title'): dlg = wx.MessageDialog(parent, message, caption, wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def Warn(parent, message, caption = 'Warning!'): dlg = wx.MessageDialog(parent, message, caption, wx.OK | wx.ICON_WARNING) dlg.ShowModal() dlg.Destroy() }}} === Scrolled Message Dialog === Show the 'message' in a ScrolledMessageDialog. This import line is required: {{{from wxPython.lib.dialogs import wxScrolledMessageDialog}}} {{{ #!python def InfoText(parent, message, caption='Information !'): dlg = wx.ScrolledMessageDialog(parent, message, caption) dlg.ShowModal() }}}