[wxMSW,WXGTK] Modeless dialog, how to handle OK event
Vadim Zeitlin
vadim at wxwidgets.org
Sat Sep 29 15:18:42 PDT 2007
On Sun, 30 Sep 2007 00:12:46 +0200 "Carsten A. Arnholm" <arnholm at offline.no> wrote:
CAA> What is the proper way to handle OK being pushed, so a different action from
CAA> what happens when Cancel is pushed can be taken?
CAA>
CAA> I have done this in MyDialog
CAA> Connect(wxID_OK,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MyDialog::OnOk);
CAA>
CAA> And it seems to work. But I wonder if this is the proper way.
I'm afraid I don't understand what exactly you're looking for. You can, of
course, handle the events from the button like above (although you should
use wxCommandEventHandler macro instead of casting to wxObjectEventFunction
like this). Or you can use an event table in the dialog class, which may be
more usual.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list