wxRearrangeCtrl: Howto catch select event
Posted: Sat Aug 31, 2019 8:02 am
I am stuck with a simple problem...
I have a wxRearrangeCtrl and would like to perform some additional action when I click on a list item.
Here is some code:
const long MY_ID = wxNewId();
wxRearrangeCtrl * arrange = new wxRearrangeCtrl(parent, MY_ID, pos, size, order, items, style, validator, name);
Connect(MY_ID, wxEVT_COMMAND_LISTBOX_SELECTED, (wxObjectEventFunction)&OnSelectClick);
void OnSelectClick(wxCommandEvent& event) {
wxMessageBox("OK");
}
The arrangebox is working well. It is shown and I can arrange the items.
However when I select an item I would like to perform some extra code but the event is never fired.
I guessed I had to subclass wxRearrangeCtrl which I did, but how to go further?
I have a wxRearrangeCtrl and would like to perform some additional action when I click on a list item.
Here is some code:
const long MY_ID = wxNewId();
wxRearrangeCtrl * arrange = new wxRearrangeCtrl(parent, MY_ID, pos, size, order, items, style, validator, name);
Connect(MY_ID, wxEVT_COMMAND_LISTBOX_SELECTED, (wxObjectEventFunction)&OnSelectClick);
void OnSelectClick(wxCommandEvent& event) {
wxMessageBox("OK");
}
The arrangebox is working well. It is shown and I can arrange the items.
However when I select an item I would like to perform some extra code but the event is never fired.
I guessed I had to subclass wxRearrangeCtrl which I did, but how to go further?