Solved

onMouseDown event of a String Grid Control

Posted on 1998-11-26
1
268 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

Industry Leaders: 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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 this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

623 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