Mouse Events Issue
Posted: Sun Apr 12, 2020 8:02 pm
Hello,
I am Writing a custom control & need to detect Mouse events. Been doing testing with wxFormBuilder to generate skeleton of my program while custom control is completely written independently.
Here is the object 2 object trees of skeleton from wxFormBuilder,


This is the code for mouse event connections, wxHistWidget is my custom control derived from wxPanel, for both
Why the code works in 1 case while not in another?
Thanks
sam
I am Writing a custom control & need to detect Mouse events. Been doing testing with wxFormBuilder to generate skeleton of my program while custom control is completely written independently.
Here is the object 2 object trees of skeleton from wxFormBuilder,


This is the code for mouse event connections, wxHistWidget is my custom control derived from wxPanel, for both
Code: Select all
Connect( wxEVT_MOTION, (wxObjectEventFunction)&wxHistWidget::OnMouseMove );
Connect( wxEVT_LEFT_DOWN, (wxObjectEventFunction)&wxHistWidget::OnMouseLDownClick );
Connect( wxEVT_MOUSEWHEEL, (wxObjectEventFunction)&wxHistWidget::OnMouseWheel );
Thanks
sam