Author Topic: [Visual C#.NET] - ListView Problem  (Read 3847 times)

ultramax

  • Posts: 55
[Visual C#.NET] - ListView Problem
« on: 31 May '05 - 19:21 »
Hi,
can someone help me please to build a playlist using the ListView component with Visual C#.NET, i tried a few things some of them work but others not ... i tried to translate a Delphi code that use a ListView to from a good guy (XMinioNX) gave me, but i can't translate it to Visual C#.NET ... jesus ... it's completly diferent all the functions ... please can someone give a help with this one?  :-\

Forgive me my bad English...

Thanks,
UltraMAX

Renegade

  • Posts: 160
Re: [Visual C#.NET] - ListView Problem
« Reply #1 on: 31 May '05 - 22:46 »
Code: [Select]
        Dim NewSong As New ListViewItem(New String() {"new", values...})
        lvwSongs.Items.Add(NewSong)
It's VB.NET, but that adds something to a listview. Is that what you're looking for? The C# is very similar.

Cheers,

Ryan

ultramax

  • Posts: 55
Re: [Visual C#.NET] - ListView Problem
« Reply #2 on: 1 Jun '05 - 00:01 »
Thank you Renegade for replying.
No man, it is not that ... i can do that ... i want to do is get the listview item index, to later jump the playlist entries, for example, in delphi:

pos : Integer;
...
pos := ListView1.ItemIndex;

i want to known how can i get the item index!  :-\

Egeron

  • Posts: 4
Re: [Visual C#.NET] - ListView Problem
« Reply #3 on: 1 Jun '05 - 13:17 »
It's easy:

ListView.FocusedItem.Index

ultramax

  • Posts: 55
Re: [Visual C#.NET] - ListView Problem
« Reply #4 on: 1 Jun '05 - 14:07 »
Thanks a lot Egeron,
it works very well for what i want to do!  ;D

Cheers...
UltraMAX

ken

  • Posts: 739
Re: [Visual C#.NET] - ListView Problem
« Reply #5 on: 3 Jun '05 - 08:25 »

ultramax

  • Posts: 55
Re: [Visual C#.NET] - ListView Problem
« Reply #6 on: 3 Jun '05 - 13:39 »
Awesome link ken, thank you very much man!!!!  ;D

... the things we can do with the listview  :P ...

Cheers...
UltraMAX