Author Topic: How can I add a list of tracks, in a listview?  (Read 112 times)

daniuchiha

  • Posts: 2
How can I add a list of tracks, in a listview?

in c# windowsforms


radio42

  • Posts: 4770
Re: How can I add a list of tracks, in a listview?
« Reply #1 on: 17 Jan '23 - 07:05 »
See here: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.listview?view=windowsdesktop-7.0

Depends on how you want to show them.
But either use ‚listView.Items.AddRange…‘ or add them one by one using the ‚listView.Items.Add‘ method.

But all this is plain C#. Not sure how this relates to BASS?

daniuchiha

  • Posts: 2
Re: How can I add a list of tracks, in a listview?
« Reply #2 on: 1 Feb '23 - 17:32 »
Taking this example as a reference, what I want is to add a button and load a list of songs in the listview, and then press play with a button, I'm trying but I can't, sorry for my bad English.

radio42

  • Posts: 4770
Re: How can I add a list of tracks, in a listview?
« Reply #3 on: 2 Feb '23 - 08:22 »
Populating the listbox should be simple - see my reference above.
And to play a track can be seen in the provided C# examples, e.g. take a look to the sample projects 'MyFirstBass', 'Simple' or 'SimpleMix'...