I want to override the scrollbar events so as to generate the cells that are coming into view.
In the dialog constructor, I have tried this:
Code: Select all
ProgramGrid->SetLabelFont(wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, false));
ProgramGrid->Bind(wxEVT_SCROLLWIN_LINEUP,ProgramGuideDialog::OnGridScroll,this);
However the overloaded function should be resolved as it is defined in the header thusly80 C:\_WXDEV-CPP Projects\Oregano\ProgramGuideDlg.cpp:153 no matching function for call to 'wxGrid::Bind(const wxEventTypeTag<wxScrollWinEvent>&, <unresolved overloaded function type>, ProgramGuideDialog* const)'
Code: Select all
class ProgramGuideDialog : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
ProgramGuideDialog(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Program Guide"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = ProgramGuideDialog_STYLE);
virtual ~ProgramGuideDialog();
void OnGridScroll(wxScrollEvent& event);
void ProgramGridCellLeftClick(wxGridEvent& event);
void ProgramGridCellRightClick(wxGridEvent& event);
I've considered sub-classing but delving deep into the wxGrid code, I don't see any virtual event handler.
I just want to catch the events, generate the data, then call event.Skip() to continue with the normal scrolling actions.
Or is there a better way to handle this? I originally had standalone scollbars which worked well, but were rather ugly compared to the built-in scrollbars.