[Lazarus] ListView problems

Hans-Peter Diettrich DrDiettrich1 at aol.com
Fri Feb 10 21:16:51 CET 2012


zeljko schrieb:

> Before any extending of example, open new issue and attach example which 
> crashes (and explanation how to reproduce please).

After a look at your new code I found these problems:

1) After changing OwnerData it's necessary to Clear the listview. This 
should be done in the widget automatically. The same for BeginUpdate and 
EndUpdate, which also must be called for a change of the Item.Count. 
Otherwise the widget is misconfigured and can show blank entries.

2) The number of OwnerData items is AllocBy in Delphi, not Items.Count. 
This property seems to be ignored or otherwise unusable - fix or remove it?
The (Win32) widget shows AllocBy items, but only for the first 
Items.Count items the OnData event occurs, the remaining items show as 
blank.


The example code is not really instructive, due to the default names for 
all controls. How shall a user know what e.g. Button1Click or 
Edit1Change code is good for?


No further problems with OwnerData, so far :-)

DoDi





More information about the Lazarus mailing list