Hi Mattia, Thanks for this. In the end I used.
$self->EndModal(wxID_ADD); Although using wxID_OK worked, it messed up the other wxID_OK. According to the "Book", you can have multiple wxID_OK's in your application but only one per dialog or frame. Regards Steve -----Original Message----- From: mattia.bar...@libero.it [mailto:mattia.bar...@libero.it] Sent: 19 August 2009 09:49 To: steve.cook...@sca-uk.com; wxperl-users@perl.org Subject: R: RE: Getting back out of a dialog box. >----Messaggio originale---- >Da: steve.cook...@sca-uk.com >Data: 19/08/2009 14.30 >A: <wxperl-users@perl.org> >Ogg: RE: Getting back out of a dialog box. > >OK, well Skip seems to work out of the top dialog, because >the top level button is defined as an OK button, but when >I drop down a level the button is defined as wxID_ADD. > >But here the "$event->Skip;" doesn't cause the event handler >to drop through. I can change wxID_ADD to be wx_ID_OK, but >that sort of defeats the purpose and means I will have >multiple OK buttons. Maybe 5 OK buttons. > >So what does wx_ID_OK do that deletes the dialog box and >exits in a controlled way? Use $dialog->EndModal( $status ); HTH Mattia