Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

Dragging Cell on Cell Click Event

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
clekkas
Asked:
clekkas
1 Solution
 
nestoruaCommented:
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
 
CleanupPingCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now