ListView dragging bug

Giganews Newsgroups
Subject:ListView dragging bug
Posted by: Justin Levene (jpleve…@netscape.net)
Date:Wed, 07 Jun 2006

I'm using a TListview component and sometimes (frequently) when an item
is selected, it starts to drag the item automatically.  The dragmode is
on dmAutomatic and works fine when I do it properly by holding down the
left mouse key.  I have tried altering the Drag Threshold :-

Mouse.DragImmediate := FALSE;
Mouse.DragThreshold := 8;

but again no luck.  I have even tried posting a message inside the
OnSelectItem event that then fills in the other components to allow all
messages to be processed before they are filled in, but again it didn't
work.

Some settings for the ListView are as follows:
ViewStyle = vsReport
DragMode = dmAutomatic
ReadOnly = TRUE
RowSelect = TRUE
HideSelection = FALSE
ColumnClick = FALSE
Align = alClient

I have also noticed that the more items I have the more frequent it
becomes, and when this autodrag-bug does appear, windows leave a trail
of the drag cursor icon.  It seems that the actual underlying Microsft
Windows component is to blame (no surprise).  I have even tried using
the Jedi ListView, again with the same results.  Another bug, though not
serious, but I feel might be related is that setting the ShowHint to
FALSE stops the Delphi hint but the ListView one still appears.

THIS MAY BE OF HELP:-
The list view is part of an email form and contains a list of the
emails, upon OnSelectItem, the application loads the email data into the
  other components from an Interbase database.

Justin

Replies