Board index » delphi » TListView?

TListView?

I'm going to dinamically form the items, depending on the user scrolling through the control.
But, beforhand a couple of questions should be answered:
How to get which items in the list visible? or what is the best way to find how many of them can
be fitted into the frame at a time.
Thanks in advance,
Iliya
 

Re:TListView?


1. The only way I know to get the total number of items to fit is by
    using
    ShowMessage(IntToStr(
      ListView1.Perform(LVM_GETCOUNTPERPAGE,0,0))) ;

2. Concerning insuring an item is visible, try MakeVisible
    or ListView_EnsureVisible(Handle,Selected.Index,False);

Quote
Iliya Nikitin wrote in message <7qrkdl$l...@forums.borland.com>...
>I'm going to dinamically form the items, depending on the user scrolling through the control.
>But, beforhand a couple of questions should be answered:
>How to get which items in the list visible? or what is the best way to find how many of them can
>be fitted into the frame at a time.
>Thanks in advance,
>Iliya

Re:TListView?


Hi,

don't make it so difficult for yourself. Just look at the virtual listview
example
which is shipped with Delphi 4 and 5 ??. I can also give you an example of
filling a listview this way, using data from a database. By the way, the
virtual mode
is only implemented in the listview which is shipped with Delphi 4 and 5.

Greetings

Rob Segerink

KSG heeft geschreven in bericht <7rh0fb$eo...@forums.borland.com>...

Quote
>1. The only way I know to get the total number of items to fit is by
>    using
>    ShowMessage(IntToStr(
>      ListView1.Perform(LVM_GETCOUNTPERPAGE,0,0))) ;

>2. Concerning insuring an item is visible, try MakeVisible
>    or ListView_EnsureVisible(Handle,Selected.Index,False);

Other Threads