Solved

StringGrid.OnSelect

Posted on 2006-06-22
4
547 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

792 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