Missing TListItem Properties lazarus / 31-LCL ---------------------------------------------------------------------- KillerCode · 2011-09-17 21:50 im converting a project from delphi to fpc, its taking a while but its fun i noticed that 2 Properties of TListItem are missing , TListItem.EditCaption and TListItem.OverlayIndex, is there any substitute for those? maybe under diffrent name/method/location? thanks ---------------------------------------------------------------------- typo · 2011-09-17 22:09 Try a feature request on BugTracker. ---------------------------------------------------------------------- d7_2_laz · 2021-02-15 12:59 This demand had been from 2011; now it's 2021 and it seems that TListItem OverlayIndex still does not exist ("No member 'OverlayIndex'"). Do i miss something here? ---------------------------------------------------------------------- dsiders · 2021-02-15 15:49 Quote from: KillerCode on September 17, 2011, 11:50:46 pmim converting a project from delphi to fpc, its taking a while but its fun i noticed that 2 Properties of TListItem are missing , TListItem.EditCaption and TListItem.OverlayIndex, is there any substitute for those? maybe under diffrent name/method/location? thanks Nothing has changed since you reported it in 2011. OverlayIndex is still skipped/ignored.Don't know why. And TListItem.EditCaption was implemented in 2012 by Juha. [Edit] Which you apparently did not test or close. ---------------------------------------------------------------------- wp · 2021-02-15 16:02 Lazarus basically was oriented on Delphi 7, and in that version a TListView property OverlayIndex did not exist. If you really need it you should file a feature request on Mantis; emphasize that OverlayIndex is now indeed supported by Delphi which leads to incompatibilities. Hopefully a developer gets interested and implements it. Or, better,  implement it yourself and submit a patch. It does not look like the original author of the Lazarus TListView is still active, so you really help the devs when you provide a patch. ---------------------------------------------------------------------- dsiders · 2021-02-15 16:07 Quote from: d7_2_laz on February 15, 2021, 01:59:34 pmThis demand had been from 2011; now it's 2021 and it seems that TListItem OverlayIndex still does not exist ("No member 'OverlayIndex'"). Do i miss something here? OverlayIndex is registered as skipped property during LCL streaming. So it obvoiusly existed at one time. Someone decided it needed to die. I doubt that complaining about it 10+years later will change any minds. Does StateIndex and the Cut, DropTarget, Focused and Selected property not give you what you need? ---------------------------------------------------------------------- wp · 2021-02-15 17:50 Quote from: dsiders on February 15, 2021, 05:07:29 pmOverlayIndex is registered as skipped property during LCL streaming. So it obvoiusly existed at one time. I would interpret this differently. RegisterPropertyToSkip is usually called when forms with VCL properties are read which do not exist in the LCL. When the streamer meets such a property it simply continues reading rather than aborting with an exception. The Note parameter of the RegisterPropertyToSkip procedure says "VCL compatibility property", and this means that the property is skipped to achieve VCL compatibility, not because it had existed at some time. ---------------------------------------------------------------------- d7_2_laz · 2021-02-15 18:52 Too new here at Lazarus for to be in the situation to write patches. As this property (which indeed did exist in Delphi 7) seems sot to be foreseen any longer  (whereas the belonging Images.DrawOverlay appears to be still valid),  i'll try to find a different way. ---------------------------------------------------------------------- JuhaManninen · 2021-02-16 00:02 Quote from: d7_2_laz on February 15, 2021, 07:52:06 pmToo new here at Lazarus for to be in the situation to write patches. As this property (which indeed did exist in Delphi 7) seems sot to be foreseen any longer  (whereas the belonging Images.DrawOverlay appears to be still valid),  i'll try to find a different way. In 2012 I resolved issue  https://bugs.freepascal.org/view.php?id=20295 but it can be reopened if somebody plans to implement TListItem.DrawOverlay. A new report can be opened for a patch, too, of course. TTreeNode.DrawOverlay can maybe work as an example for implementing. A test project using TListItem.DrawOverlay would also be helpful. ---------------------------------------------------------------------- d7_2_laz · 2021-02-16 09:36 I need to apologize! I had to recognize now that my own use case for the listitem overlays - draw shortcut symbol onto the icons for linked file objects -, which previoulsy (Delphi 7) ended up with something like "SmallImages.DrawOverlay(Canvas, R.Left, R.Top, 1, 1);", unfortunately now became a very bad example for that. Because that latter call turned out to be not applicable too. I fear probably i need to explain this a bit. Within the topic 'ShellTreeview and system icons" with solution provided by wp and GetMem there are too approaches thinkable. The method accessing the system icons via index (iIcon) does not return the overlays. The final solutions provided by GetMem is accessing a handle to the icon object itself (hIcon). It appears the hIcon used does have the linkoverlay already merged into the icon, wherease the iIcon access has not. So for this use case it's better to follow the hIcon approach, whereas listview SmallIcons/LargeIcons cannot used here anymore for system icons. Sorry for this inconvenience! For other uses cases the property listitem OverlayIndex might stay useful though.