Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: blinkdude on November 19, 2003, 02:56 AM

Title: List View Help
Post by: blinkdude on November 19, 2003, 02:56 AM
With a ListBox this will select the next Item added.

List1.ListIndex = List1.ListIndex + 1

I was wondering How you would do this with a ListView?
Title: Re:List View Help
Post by: ______ on November 19, 2003, 10:26 AM

for i = 1 to listview.listitems.count
listview.listitems(i).index = listview.listitems(i).index + 1
next i


Maybe that will work?
Title: Re:List View Help
Post by: Spht on November 19, 2003, 10:50 AM
Quote from: blinkdude on November 19, 2003, 02:56 AM
With a ListBox this will select the next Item added.

List1.ListIndex = List1.ListIndex + 1

I was wondering How you would do this with a ListView?

Are you asking this because you want to know how to add an item to the end of your ListView? If so, do:

With ListView1.ListItems
   .Add .Count + 1, [key], [text], [icon], [smallicon]
End With

Edit - Removed [ code ] tag since it was interferring with style tag.
Title: Re:List View Help
Post by: blinkdude on November 19, 2003, 01:35 PM
Maybe with more infromation it will help ;) Its for an Mp3 player and then "Next Song" Button Will play the Next Song in the listview...any ideas?
Title: Re:List View Help
Post by: Stealth on November 19, 2003, 04:11 PM
I believe this can be done using the item.Selected property and the SelectedItem method.


With lvwSongList
     .ListItems(.SelectedItem.Index + 1).Selected = True
End With


I'm not sure if you'd have to then deselect the previously-selected item -- I think that if the listview.MultiSelect property is false you don't need to. Also, you'll need to error-trap in case the end of the list has been reached, or no items are selected.
Title: Re:List View Help
Post by: blinkdude on November 19, 2003, 05:12 PM
ah thanks works!
Title: Re:List View Help
Post by: Banana fanna fo fanna on November 19, 2003, 05:26 PM
I'll give ya 10 bucks to beat winamp2 :)
Title: Re:List View Help
Post by: blinkdude on November 20, 2003, 12:22 AM
Ha! heres a ss i also added more stuff but like A Remove Load/save Lists ..You can run it wiht bot or with out...
http://eternalsoldiers.net/esbot/ss/ss7.gif
http://eternalsoldiers.net/esbot/ss/ss7.gif
Title: Re:List View Help
Post by: Arta on November 20, 2003, 07:48 AM
Player*
Title: Re:List View Help
Post by: Dyndrilliac on November 20, 2003, 05:02 PM
Quote from: St0rm.iD on November 19, 2003, 05:26 PM
I'll give ya 10 bucks to beat winamp2 :)

I dunno if I can beat Winamp2, but Ill take that bet if you'll accept a Winamp clone ;)