Skip to content

Instantly share code, notes, and snippets.

@batok
Created October 13, 2010 14:52
Show Gist options
  • Save batok/624184 to your computer and use it in GitHub Desktop.
Save batok/624184 to your computer and use it in GitHub Desktop.
import wx.lib.agw.gradientbutton as GB
import wx.lib.agw.genericmessagedialog as GMD
class GMDialog(object):
@classmethod
def show(cls, win, mensaje, titulo):
dlg = GMD.GenericMessageDialog(win, mensaje, titulo, wx.OK | ( wx.ICON_INFORMATION + GMD.GMD_USE_GRADIENTBUTTONS ) )
val = dlg.ShowModal()
dlg.Destroy()
return val
@classmethod
def yes_no(cls, win, mensaje, titulo):
dlg = GMD.GenericMessageDialog(win, mensaje, titulo, wx.YES_NO | ( wx.ICON_QUESTION + GMD.GMD_USE_GRADIENTBUTTONS ) )
val = dlg.ShowModal()
dlg.Destroy()
return val == wx.ID_YES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment