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
Solved

Dragging Cell on Cell Click Event

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

789 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