Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dragging Cell on Cell Click Event

Posted on 2002-03-31
2
Medium Priority
?
309 Views
Last Modified: 2010-04-04
I want to allow the user to click on a cell of a standard delphi dbgrid and drag the cell and drop the contents to another component like edit or listbox. Can anyone help me.
Thank you
0
Comment
Question by:clekkas
2 Comments
 
LVL 4

Accepted Solution

by:
nestorua earned 800 total points
ID: 6923127
HI, clekkas,
Try this (I suppose you know what to do with OnDragOver and DragDrop events):
procedure TForm1.DBGrid1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 if ((Button=mbLeft) and (ssCtrl in Shift)) then
  begin
   DBGrid1.BeginDrag(False, 20);
  end;
end;Sincerely,
Nestorua.
0
 

Expert Comment

by:CleanupPing
ID: 9343202
clekkas:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

926 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