Advertisement

06.04.2004 at 03:53PM PDT, ID: 21014216
[x]
Attachment Details

Start drag operation

Asked by dia21 in Delphi Programming

Tags: drag, listview

i've created in my apllication an drag&drop event on a listview. The drag&drop works but i have a little problem when i open a file from this listview by double cliking the item.
.When i double click the item from listview that opens a file it will automatically starts the drag&drop operation too. How can i modify the code below to accept only when i press the mouse button and move the mouse pointer

procedure TForm1.ViewUrlMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
   if (Button = mbLeft) then
   with Sender as TListView do
     begin
    if ViewUrl.GetItemAt(X,Y)<>Nil then
     begin
        if Button=mbRight then exit;
        BeginDrag(false);
     end;
     end;
end;Start Free Trial
[+][-]06.05.2004 at 05:56AM PDT, ID: 11239274

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2004 at 10:12AM PDT, ID: 11240287

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.08.2004 at 05:37AM PDT, ID: 11259246

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.24.2004 at 11:23AM PDT, ID: 11391869

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.24.2004 at 11:45AM PDT, ID: 11392084

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.28.2004 at 07:09AM PDT, ID: 11415776

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Delphi Programming
Tags: drag, listview
Sign Up Now!
Solution Provided By: modulo
Participating Experts: 3
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32