Solved

Multiple column listbox in C#

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now