StringGrid.OnSelect

Why does clicking on a StringGrid cell when the DragMode is set dmAutomatic not call the OnSelect event? Instead I noticed that it calls the StartDrag event.  I want the StringGrid to allow the selection of a cell as if the DragMode was set dmManual, and when the the mouse button is held down to begin a drag of the StringGrid cell's object.  Many thanks.
Vector7Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
RickJConnect With a Mentor Commented:
I dont think I am clear in what you are trying to do.
My comment was assuming that you would use dmManual.
But on reading your comment again, I see that you still want to use dmAutomatic?
And make onselect execute for dmAutomatic?
Why not use dmManual instead of dmAutomatic?
Just trying to get a picture of what you are actually trying to do.

Thanks
Rick.
0
 
RickJCommented:
In the mousedown event of the stringgrid do this...

if (Button = mbLeft) then
    StringGrid1.BeginDrag (false) ;

Please look at help for impact of BeginDrag parameters. Very important.
Then in the target control use the dragover and dragdrop method to handle your drop.

Hope this helps.
0
 
Vector7Author Commented:
Thankyou RickJ for replying. I've tried your suggestion but the StringGrid still doesn't call the On Select event.
0
 
Vector7Author Commented:
Thanks for your help.
0
All Courses

From novice to tech pro — start learning today.