Solved

Multiple column listbox in C#

Posted on 2008-06-15
4
2,794 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 30

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 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