• Welcome to Valhalla Legends Archive.
 

List View Help

Started by blinkdude, November 19, 2003, 02:56 AM

Previous topic - Next topic

blinkdude

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?
<Total-Assault@Azeroth> WTF IS THIS CLAN A BUNCH OF NERDS?
<Yoni[vL]@Azeroth> Yes.
<Grok> Yes.
<[vL]Kp> You sound surprised.
<Total-Assault> at least they admit it
&

______


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


Maybe that will work?

Spht

#2
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.

blinkdude

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?
<Total-Assault@Azeroth> WTF IS THIS CLAN A BUNCH OF NERDS?
<Yoni[vL]@Azeroth> Yes.
<Grok> Yes.
<[vL]Kp> You sound surprised.
<Total-Assault> at least they admit it
&

Stealth

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.
- Stealth
Author of StealthBot

blinkdude

<Total-Assault@Azeroth> WTF IS THIS CLAN A BUNCH OF NERDS?
<Yoni[vL]@Azeroth> Yes.
<Grok> Yes.
<[vL]Kp> You sound surprised.
<Total-Assault> at least they admit it
&

Banana fanna fo fanna

I'll give ya 10 bucks to beat winamp2 :)

blinkdude

#7
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
<Total-Assault@Azeroth> WTF IS THIS CLAN A BUNCH OF NERDS?
<Yoni[vL]@Azeroth> Yes.
<Grok> Yes.
<[vL]Kp> You sound surprised.
<Total-Assault> at least they admit it
&

Arta


Dyndrilliac

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 ;)
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.