Solved

StringGrid.OnSelect

Posted on 2006-06-22
4
544 Views
Last Modified: 2010-04-04
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.
0
Comment
Question by:Vector7
  • 2
  • 2
4 Comments
 
LVL 8

Expert Comment

by:RickJ
ID: 16958573
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
 

Author Comment

by:Vector7
ID: 16959171
Thankyou RickJ for replying. I've tried your suggestion but the StringGrid still doesn't call the On Select event.
0
 
LVL 8

Accepted Solution

by:
RickJ earned 125 total points
ID: 16965194
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
 

Author Comment

by:Vector7
ID: 16970776
Thanks for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now