ListIcon, detect first and last visible items. Is possible?

Just starting out? Need help? Post your questions and find answers here.
zikitrake
Addict
Addict
Posts: 877
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

ListIcon, detect first and last visible items. Is possible?

Post by zikitrake »

Hi,

I want to make some hard calc with some values, but only with visible items from a ListIcon gadget.
Is possible retrieve this data?..

A 'fake' of results will be this
Image


Thank you in advance
PB 6.21 beta, PureVision User
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: ListIcon, detect first and last visible items. Is possible?

Post by netmaestro »

On Windows you can use the LVM_HITTEST message for a point such as 5,5 and it will return the item found there, which will be your first visible item. For the last one, you can use a point such as 5, GadgetHeight(listicon)-5. For other OS's, dunno.
BERESHEIT
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: ListIcon, detect first and last visible items. Is possible?

Post by srod »

There's also the #LVM_GETTOPINDEX and #LVM_GETCOUNTPERPAGE messages.
I may look like a mule, but I'm not a complete ass.
zikitrake
Addict
Addict
Posts: 877
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: ListIcon, detect first and last visible items. Is possible?

Post by zikitrake »

Netmaestro, Srod, very thank you. But, for now, I would like to make my app for Windows/Linux, so I'm thinking to remake the frontend of my app.

Again, thankyou for answers.
PB 6.21 beta, PureVision User
Post Reply