July 04, 2024, 06:41:15 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Listview GetSelected question

Started by Brian, December 18, 2011, 05:39:33 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Brian

Hi,

Say I have a few hundred items in a listview. I manually select 10 of them

How do I run through just the selected items to print them? I already have
the print mechanism in place, it is just the problem of getting the selected items
and outputting them

Thanks,

Brian

billhsln

This should work:

count = CONTROLCMD(dView,1, @LVGETCOUNT)
FOR i = 0 to count - 1
IF CONTROLCMD(dView,1,@LVGETSELECTED,i)
' Print record
ENDIF
NEXT i


Bill
When all else fails, get a bigger hammer.

Brian

Thanks, Bill - your code was not as long-winded as mine!

Brian