TListView.Selected in combination with MultiSelect is incompatible to Delphi
Original Reporter info from Mantis: DRIGUS
-
Reporter name: DRIGUS GmbH
Original Reporter info from Mantis: DRIGUS
- Reporter name: DRIGUS GmbH
Description:
In order to run through all selected items in a TListView I use TListView.Selected to retrieve the first selected item. The following is an abstract of the Delphi 5 help:
"Read Selected to access the properties of the first selected item in the list. [...] If SelCount is greater than 1, subsequent selected items can be located by checking the Selected property of the items found using the GetNextItem method."
In Lazarus, TListView.Selected always returns the lasty selected item when MultiSelect is TRUE. Seems to be some kind of optimization regarding function TCustomListView.GetSelection in lcl\include\customlistview.inc and the flag lffSelectedValid.
See attached Lazarus project for an example. Tested on Windows XP and Windows Embedded CE 6.0.
Additional information:
Lazarus 0.9.29 r26246
FPC 2.4.1
i386-win32-win32/win64
Mantis conversion info:
- Mantis ID: 16773
- Version: 0.9.29 (SVN)
- Fixed in revision: 33128 (#319d2fbb)
- Monitored by: » DRIGUS (DRIGUS GmbH)
- Target version: 0.99.0