Solved

onMouseDown event of a String Grid Control

Posted on 1998-11-26
1
255 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

13 Experts available now in Live!

Get 1:1 Help Now