Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Topaz on August 06, 2005, 04:20 PM

Title: Listview Question
Post by: Topaz on August 06, 2005, 04:20 PM
Is there a ListView.SelectedItems function? I enabled MultiSelect, and I want it to send multiple lines of text at once on PopUp.
Title: Re: Listview Question
Post by: Spht on August 06, 2005, 09:48 PM
Quote from: Topaz on August 06, 2005, 04:20 PM
Is there a ListView.SelectedItems function? I enabled MultiSelect, and I want it to send multiple lines of text at once on PopUp.

What?

Are you trying to find out what items are selected in your list view?  Use (bool) "ListView.ListItems(Index).Selected" (ListView being the "name" of your ListView object, and Index being the list index of the item you want to check) to find out if an item is selected.
Title: Re: Listview Question
Post by: Topaz on August 07, 2005, 01:02 PM
My bad, its difficult to explain. I was wondering if there was a function that will read all the Selected items in a Listview, when MultiSelect is enabled.
Title: Re: Listview Question
Post by: Stealth on August 07, 2005, 07:01 PM
A For loop would do the trick very easily for you..
Title: Re: Listview Question
Post by: Grok on August 07, 2005, 09:13 PM
Quote from: Topaz on August 07, 2005, 01:02 PM
My bad, its difficult to explain. I was wondering if there was a function that will read all the Selected items in a Listview, when MultiSelect is enabled.

No intrinsic function (provided with VB).  However, as pointed out, not hard to write a loop to accumulate the selected items.