Multi-select using mouse in dbgrid (similar to Excel)
Has anyone coded an interactive 'multi-select' on a dbgrid using
mousemove?
This would work similar to the way excel does it.... i.e. left click
mouse, move mouse, release left click - this interactively highlights
a group of cells or rows based on the area that the mouse has moved
over.
Moving the mouse out of the grid causes scrolling.
I've coded the multi-select bit using the mousedown and mouseup
events, but am not too sure of the best way to code the 'interactive'
bit - i.e. if the left click is pressed and the mouse moves around the
grid, to highlight cells/rows as the mouse moves, so before the left
click button is released and the mouseup event is called.
Also not sure of the best way of getting the grid to scroll when the
mouse moves outside the grid.
Any sample code I might be able to use? Any tips?
Thanks in advance!