gui/dialog.py
def confirm(message="", title="", default=False, ok=False, cancel=False,
            parent=None):
    "Ask for confirmation (yes/no or ok and cancel), returns True or False"
    style = wx.CENTRE
    if ok:
        style |= wx.OK 
    else:
        style |= wx.YES | wx.NO
        if default:
            style |= wx.YES_DEFAULT
        else:
            style |= wx.NO_DEFAULT
    if cancel:
        style |= wx.CANCEL
    result = dialogs.messageDialog(parent, message, title, style)
    if cancel and result.returned == wx.ID_CANCEL:
        return None
    return result.accepted
def confirm(message="", title="", default=False, ok=False, cancel=False,
            parent=None):
    "Ask for confirmation (yes/no or ok and cancel), returns True or False"
    style = wx.CENTRE
    if ok:
        style |= wx.OK 
    else:
        style |= wx.YES | wx.NO
        if default:
            style |= wx.YES_DEFAULT
        else:
            style |= wx.NO_DEFAULT
    if cancel:
        style |= wx.CANCEL
    result = dialogs.messageDialog(parent, message, title, style)
    if cancel and result.returned == wx.ID_CANCEL:
        return None
    return result.accepted
def confirm ( message = "" , title = "" , default = False , ok = False , cancel = False , parent = None ) : style = wx . CENTRE if ok : style |= wx . OK else : style |= wx . YES | wx . NO if default : style |= wx . YES_DEFAULT else : style |= wx . NO_DEFAULT if cancel : style |= wx . CANCEL result = dialogs . messageDialog ( parent , message , title , style ) if cancel and result . returned == wx . ID_CANCEL : return None return result . accepted
Ask for confirmation (yes/no or ok and cancel), returns True or False
Ask for confirmation ( yes / no or ok and cancel ) returns True or False