Board index » delphi » TListView : Why ist Listview_Getitemtext() so slow

TListView : Why ist Listview_Getitemtext() so slow

Hallo everybody

To fasten my Listview I use :

    ListView_SetItemText(lv1.handle,i,0,pchar(qrartikelzeich_nr.value));
    ListView_SetItemText(lv1.handle,i,1,pchar(qrartikelnr.value));
    ListView_SetItemText(lv1.handle,i,2,pchar(qrartikelbez.value));

To make my sorting I use the OnCompare-Event. To make my
compares, I have to use the command ListView_GetItemText and
this is very slow.
First used it with the Lv1.items.item[i].SubItem.strings[j] to make the
compares. This was very fast. But when I use the Listview_setitemtext(),
I don't have the Subitems any more.

Does anybody has an idea to fasten it up?

Thank's for any help.

Arthur

 

Re:TListView : Why ist Listview_Getitemtext() so slow


Quote
In article <798s2k$hd...@forums.borland.com>, Ar wrote:
> ListView_SetItemText(lv1.handle,i,0,pchar(qrartikelzeich_nr.value));

Why not just use:

  lv1.Items[0].Caption := qrartikelzeich_nr.value;

You should be careful of code in the OnChange event though, as it fires
several times.  

 Mike Orriss (m...@3kcc.co.uk)
 http://www.3kcc.co.uk/notetree.htm

Other Threads