Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003022 [JEDI VCL] 00 JVCL Components minor always 2005-06-09 10:23 2005-08-03 08:05
Reporter anonymous View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003022: TJvListview item click not selected
Description Sometimes 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.

Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0007424)
obones (administrator)
2005-06-11 09:31

Reproduced in D6, WinXP
(0007577)
edbored (reporter)
2005-07-19 21:45

Reproduced in D7/W2K

Modified SetFocus as follows to resolve:

procedure TJvListView.SetFocus;
var // added
 k: integer; // added
begin
  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
end;


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

Cheers,
EdB
(0007649)
anonymous (viewer)
2005-07-31 16:07

edbored patch works for this issue ...
(0007659)
obones (administrator)
2005-08-03 08:05

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-19 21:53 edbored Note Added: 0007578
2005-07-20 01:31 obones Note Deleted: 0007578
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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker