MsgBox.py
Upload User: lswyart
Upload Date: 2008-06-12
Package Size: 3441k
Code Size: 0k
Category:

Kill Virus

Development Platform:

Visual C++

  1. from wxPython.wx import *
  2. def MessageBox(parent, caption, message, flags = wxOK | wxICON_INFORMATION):
  3.         dlg = wxMessageDialog(parent, message, caption, flags)
  4.         try:
  5.             ret = dlg.ShowModal()
  6.         finally:
  7.             dlg.Destroy()    
  8.         return ret
  9.     
  10. def ErrorBox(parent, message):
  11.     return MessageBox(parent, 'Error', message, wxOK | wxICON_ERROR)
  12. def InfoBox(parent, message):
  13.     return MessageBox(parent, 'Information', message)
  14.