I have problem with the MouseMove/MouseDrag management. Here is a little schematic:
All the Components are built dynamically. The user can select several CellComponents by clicking on one and moving the mouse till it reaches any other CellComponents. Basically, the selected CellComponents are those that are contained in the rectangle starting where the first MouseDown happened, ending where the mouse is now (it works exactly as an Excel selection).
To do that, I have my CellComponents override the MouseDown method, notifying the PatternComponent, which in turns detects that a selection has started.
At that moment, the CellComponent::mouseDrag is triggered whenever the mouse moves. The problem is: only the first clicked CellComponent will send the mouseDrag event because the drag started on it. If the mouse goes over any other CellComponent, I can NOT detect it. I tried to use the mouseMove event, but it isn't sent anymore as soon as a mouse button is down.
A solution could be to change mouseMove code (change the Component original behavior) to always send the mouseMove, regardless of the button state, but I don't know if it's the best way.
Maybe use some lower-level event I don't know about? Basically, I really want to avoid calculating which Component has been clicked from raw mouse events data.
Thanks for you help.