I have a TDrawGrid and want to handle clicking on a cell and scrolling through cells with the mouse wheel slightly differently: When scrolling with the mouse wheel, the view shall center on the selected cell, when simply clicking on a cell, the view shall not move (because that'd be confusing).
Scrolling with the mouse wheel fires the OnSelectCell
event. Clicking on a cell FIRST fires OnSelectCell
, followed by OnMouseDown
. So I need to figure out if OnSelectCell
was triggered by a mouse click. Easiest way to do (that I can think of) would be to check the current mouse-button state.
OnSelectCell
doesn't come with any TMouseButton
or TShiftState
parameter. So how can I query the mouse-button state?