Validator in custom dialog: question

Hello.

I have custom dialog with buttons 'Save' and 'Cancel'. No 'OK' button.

Pressing 'Save' button calls OnSave and it's ok. My dialog contains some text fields that i want to validate and i make code as from examples but Validation doesn't work. , but if i use buton with id wxID_OK it's fine, but i need to make some job when user press 'Save' button. What do i need to do to make it work?

def OnSave(self, event):
        c = Configuration()
        c.save(self.username.GetValue(),
            self.ip.GetValue(),
            self.netmask.GetValue(),
            self.mac.GetValue())
        self.Close()

Thanks in advance, your help is very appreciated.

Best regards,
Ruslan

Why not just use a button named "Save", but with id wxID_OK?

···

On Tue, Jul 15, 2003 at 05:10:53PM +0300, Ruslan Spivak wrote:

I have custom dialog with buttons 'Save' and 'Cancel'. No 'OK' button.

--
Tim Lesher <tim@lesher.ws>
http://www.lesher.ws