Solved

onMouseDown event of a String Grid Control

Posted on 1998-11-26
1
262 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

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