July 07, 2024, 12:35:30 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


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