Solved

onMouseDown event of a String Grid Control

Posted on 1998-11-26
1
263 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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