[C#] Custom ListBox-style control

Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
I want to create a custom control in C# that looks something like the download list you see in Firefox:

downloads8dg.png


I've looked at several different websites about creating custom controls like this, but I'm not quite sure where to begin, as most of them use their own ways of doing it...

Should my control be inheriting from UserControl or ListBox/similar control? I'm also not sure whether each list item should have its own class, or whether it should just be drawn directly by the list itself (my guess would be to have its own class as it needs to have a fair bit of metadata associated with it, including a progress bar).

Could anyone give me some pointers or advice? I'm confused :confused:

Cheers!
 
Last edited:
Thanks for the reply. I'm a bit stuck again I'm afraid :p
I've resorted to making a user control for the individual items, as they involve things like progress bars, labels and a button on each one. I can't work out how to use this user control in a list though, and I'm still a bit confused as to how the whole List control itself actually works.

Does it need to inherit from a similar control like ListBox in order to work properly? If so, how do I go about changing it to use the user control rather than just a line of text for each item (if that's even possible)? :confused:

Cheers
 
Back
Top Bottom