I can't build this under Windows, so i can't test this. (BTW: If you want your code to work properly under Windows at some time in the future, you'll need to get rid of at least some of the std::string, or you will get issues with wide characters)
Thank you for the suggestion, I will keep it in mind.
But i unfortunately i can't spot the mistake either. For a test can you try to Bind wxEVT_DATAVIEW_ITEM_ACTIVATED (which should trigger on double-clicking an entry) ?
I tried binding wxEVT_DATAVIEW_ITEM_ACTIVATED, still no luck. Could it be a bug? Maybe in my installation?
Code: Select all
SampleListView->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, &Browser::OnClickSampleView, this);
Also, PB's suggestion should at least have compiled. What was the exact error message you got?
Yes it did compile, but it didn't work, and I got no error either.
BTW: It should be obvious, but just to be sure: The DVC must contain some items, these events won't fire when clicking on empty space
Yes, I'm adding data to it first, then clicking on rows.
The wxSearchCtrl is also on the same panel as wxDataViewListCtrl, search ctrl works fine. Its just the dataview that's not working, I even tried wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, as I have a toggle column in the dataview it does not work either.