Solved

MousePosition

Posted on 1997-12-29
1
120 Views
Last Modified: 2010-04-04
Hi,
I would like to know in a DBGRIDDBLClick procedure what the mouse position is (X,Y). How can I do this?
0
Comment
Question by:lizzzard
1 Comment
 
LVL 2

Accepted Solution

by:
Felixin earned 50 total points
ID: 1354832
A DBGrid is a component derived from TControl.

If you look on the events list of TControl, you will find an OnMouseMove event that you can use to get the X and Y coordinates of the mouse position.

Further, you can use the MouseCoord procedure of the DBGrid Object to transform the X and Y coordinates of the mouse, into the Row and Column of the DBGrid cell.

The only problem that you can have here, is that the OnMouseMove event does not appear in the object inspector events tab. I think you can solve the problem by inserting a line of code assigning your event handler to that event when the form is first created (using the FormCreate procedure).
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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 …

685 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