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(Se
nder: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (Button = mbLeft) then
with Sender as TListView do
begin
if ViewUrl.GetItemAt(X,Y)<>Ni
l then
begin
if Button=mbRight then exit;
BeginDrag(false);
end;
end;
end;
Start Free Trial