View Issue Details

IDProjectCategoryView StatusLast Update
0003022JEDI VCL00 JVCL Componentspublic2005-08-03 08:05
ReporteranonymousAssigned Toobones 
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003022: TJvListview item click not selected
DescriptionSometimes if you click on a item of the TJvListView, it is not selected.

To reproduce this, create a new application, drop a TJvListView on it.
Change the viewStyle to vsReport.
Now add for example 3 columns (give them some titles)
Now add 3 or 4 items (and give them some caption)

To exactly reproduce the error, do this...
- Click on the first item
- Now click under the last item (i mean under, in the empty space of listview but inside it)
You have to see that the item 1 previously selected, remains with a box.
- Now try to select the second or third item.

TagsNo tags attached.



2005-06-11 09:31

administrator   ~0007424

Reproduced in D6, WinXP


2005-07-19 21:45

reporter   ~0007577

Reproduced in D7/W2K

Modified SetFocus as follows to resolve:

procedure TJvListView.SetFocus;
var // added
 k: integer; // added
  inherited SetFocus;
  if (ItemFocused=nil) // added
    then k:=0 // added
  else // added
   k:=ItemIndex; // added
  if AutoSelect and (Selected = nil) and (Items.Count > 0) then
// PostMessage(Handle, WM_AUTOSELECT, Integer(Items[0]), 1);
    PostMessage(Handle, WM_AUTOSELECT, Integer(Items[k]), 1); // changed

Not particularly elegant, but very clear and will no doubt allow someone with cvs access to fix properly.



2005-07-31 16:07

viewer   ~0007649

edbored patch works for this issue ...


2005-08-03 08:05

administrator   ~0007659

Setting AutoSelect to False allows to go around that bug.
But a slightly modified version of the fix by edbored is now in CVS.

Issue History

Date Modified Username Field Change
2005-06-09 10:23 anonymous New Issue
2005-06-11 09:31 obones Note Added: 0007424
2005-06-11 09:31 obones Status new => confirmed
2005-07-19 21:45 edbored Note Added: 0007577
2005-07-31 16:07 anonymous Note Added: 0007649
2005-08-03 08:05 obones Status confirmed => resolved
2005-08-03 08:05 obones Resolution open => fixed
2005-08-03 08:05 obones Assigned To => obones
2005-08-03 08:05 obones Note Added: 0007659