Message Boxes
Use the wxMessageDialog class. Don't forget to Destroy() it when you're done.
Example
Some handy functions for common message box tasks:
1 def YesNo(parent, question, caption = 'Yes or no?'):
2 dlg = wx.MessageDialog(parent, question, caption, wx.YES_NO | wx.ICON_QUESTION)
3 result = dlg.ShowModal() == wx.ID_YES
4 dlg.Destroy()
5 return result
6 def Info(parent, message, caption = 'Insert program title'):
7 dlg = wx.MessageDialog(parent, message, caption, wx.OK | wx.ICON_INFORMATION)
8 dlg.ShowModal()
9 dlg.Destroy()
10 def Warn(parent, message, caption = 'Warning!'):
11 dlg = wx.MessageDialog(parent, message, caption, wx.OK | wx.ICON_WARNING)
12 dlg.ShowModal()
13 dlg.Destroy()
Scrolled Message Dialog
Show the 'message' in a ScrolledMessageDialog. This import line is required: from wxPython.lib.dialogs import wxScrolledMessageDialog