Solved

Dragging Cell on Cell Click Event

Posted on 2002-03-31
2
285 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 200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Machine not responding during CopyFile() 3 89
how to center only a line in richedit? 4 52
Printing problem 2 80
Moving (cutting/pasting) controls in a TTabbedNotebook... 7 27
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

16 Experts available now in Live!

Get 1:1 Help Now