Hello!
I have this function that prompts a wx.MessageDialog

def DelUserDlg(self, event):
		dlg = wx.MessageDialog(None, 'Are you sure you want to delete your user?', 'Question', wx.OK | wx.CANCEL | wx.NO_DEFAULT | wx.ICON_QUESTION)
		dlg.ShowModal()

I would like to assign an event to delete a mysql database user. How can I assign the event to the 'Ok' button?
Cheers!

Dani

Like this mate?

def DelUserDlg(self, event):
    dlg = wx.MessageDialog(None, 'Are you sure you want to delete your user?',
        'Question', wx.OK | wx.CANCEL | wx.NO_DEFAULT | wx.ICON_QUESTION)
    result = dlg.ShowModal()
    dlg.destroy()
    if result == wx.ID_OK:
        self.delete_user_function()

Cheers and Happy coding