Solved

StringGrid.OnSelect

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

20 Experts available now in Live!

Get 1:1 Help Now