Solved

Multiple column listbox in C#

Posted on 2008-06-15
4
2,792 Views
Last Modified: 2013-12-17
Hello,

I am looking for a way, in C#, to have a listbox with multiple colums, such as in a music player or similar program, where the song title, artist etc. are listed.

I am working in C# Express.

Any help would be greatly appreciated.
0
Comment
Question by:dh-s
  • 2
4 Comments
 
LVL 16

Expert Comment

by:CuteBug
ID: 21790512
0
 
LVL 29

Accepted Solution

by:
anarki_jimbel earned 250 total points
ID: 21790938
The first article is quite irrelevant - ListBox..::.MultiColumn Property property means that items are rendered in multiple columns (not that one item occupies many columns...)

Second link is quite old - not sure if it's working.

Did you consider using listView for your tasks. I believe it's not bad option if you need many columns (you just use items and subitems for each item):
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=740&lngWId=10
0
 
LVL 16

Assisted Solution

by:CuteBug
CuteBug earned 250 total points
ID: 21791423
Hi,
    I apologize for the first link.

    Yeah, ListView seems to be a better option. But the link provided by anarki_jimbel provides VB code.

    Here is the link for using ListView in C#.
    http://en.csharp-online.net/ListView
0
 

Author Comment

by:dh-s
ID: 21792595
Thanks. Using a combination of those 2 links (in the last 2 posts) I was able to do what I wanted.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question