Solved

onMouseDown event of a String Grid Control

Posted on 1998-11-26
1
260 Views
Last Modified: 2010-04-04
Hi all again...

I need to make some actions when the left mouse button is pressed over a string grid control. I have the following code in the event handler:

procedure TEmulador.GridMemoExMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if Button = mbLeft then
    ModifExt.ShowModal;
end;

The problem is that when I press the left mouse button, the ModifExt dialog box is displayed, but besides that, a transparent square around one element in the string grid appears which follows the mouse, even if I don't have any mouse button pressed and the mouse isn't over the control. In this last case, that square just moves until it reaches the border column or row, depending on where is the mouse cursor. Ah.. and that situation finishes when I press the button over other control.

How can I solve it? I'm at present changing the focus to another control using SetFocus, but it's a little visible that the above condition still ocurres.

Thanks in advance
Jaime
0
Comment
Question by:skel
1 Comment
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1348027
Change it to the OnMouseUp event.

Cheers,

Raymond.
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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 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