How to fast read and write in listview in delphi?

后端 未结 6 1911
梦如初夏
梦如初夏 2020-12-09 12:55

There is a listview with several fields in delphi. A thread checks and adds items to listview. If there is the same caption, an integer will be added in the subitem of this

6条回答
  •  北海茫月
    2020-12-09 13:51

    The Delphi TListView control is a wrapper around the Windows list view component. In its default mode of operation copies of the list data are transferred from your app to the Windows control and this is slow.

    The alternative to this is known as a virtual list view in Windows terminology. Your app doesn't pass the data to the Windows control. Instead, when the control needs to display data it asks your app for just the data that is needed.

    The Delphi TListView control exposes virtual list views by use of the OwnerData property. You'll have to re-write your list view code somewhat but it's really the only solution.

提交回复
热议问题