You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, most of the examples use a single EVT_COMMAND set to handle wxID_ANY by dispatching it to a general OnButton with a switch that dispatches to the correct button. This is cumbersome and big switch statements are annoying. Instead, we should be using EVT_BUTTON to create the event table and individual handlers directly connected to the event IDs, like so:
Currently, most of the examples use a single EVT_COMMAND set to handle wxID_ANY by dispatching it to a general OnButton with a switch that dispatches to the correct button. This is cumbersome and big switch statements are annoying. Instead, we should be using EVT_BUTTON to create the event table and individual handlers directly connected to the event IDs, like so:
enum TabEventIDs {
id_button_action1 = wxID_HIGHEST+1
};
BEGIN_EVENT_TABLE(Tab, wxPanel)
EVT_BUTTON(id_button_action1, Tab::OnAction1)
END_EVENT_TABLE()
void Tab::OnAction1(wxCommandEvent& evt) { }
The text was updated successfully, but these errors were encountered: