IonicWind Software

IWBasic => General Questions => Topic started by: Brian on December 18, 2011, 05:39:33 AM

Title: Listview GetSelected question
Post by: Brian on December 18, 2011, 05:39:33 AM
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
Title: Re: Listview GetSelected question
Post by: billhsln on December 18, 2011, 09:35:06 AM
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
Title: Re: Listview GetSelected question
Post by: Brian on December 18, 2011, 09:48:03 AM
Thanks, Bill - your code was not as long-winded as mine!

Brian