Click here to Skip to main content
15,886,578 members
Articles / Desktop Programming / Windows Forms
Article

Status List

Rate me:
Please Sign up or sign in to vote.
4.75/5 (35 votes)
16 May 2007CPOL3 min read 69.7K   917   86   15
A progress list for displaying the status of various tasks

Screenshot - demo.jpg

Introduction

This project is inspired by "Status List - Vista Style" by Shapour.

There are few reasons for this project and article. One is that the original project is written in VB.NET, and I am a C# guy (whilst I do fluently read VB and many other languages, I can't stand writing in it). Secondly, I found a number of limitations in the original control which I decided to fix and improve.

Improvements

The list of improvements as follows:

  • StatusItem object became a descendant of Control, meaning it inherits all the richness of its Father. The main reason for that change - the item paints itself, instead of being painted by the StatusList, which is more OOP way. This way it also opens a potential for other control to be put inside (I haven't tested this assumption, it actually occured to me while I was writing the article).
  • I didn't like the fact that if I have a few items in the list I have to scroll and the heading is scrolled off. I wanted to have items in a container, meaning that the heading will always stay visible. There is an option to hide the heading if you don't need it.
  • I personally find it more pleasing to the eye that all of the items are of the same width. Whilst in the designer you can move/resize individual items, they will be (re)laid out by the control automatically.
  • I have added events StatusItemAdded, StatusItemRemoved and StatusItemStatusChanged which provide you with enough flexibility to track the state of the list and individual items.

Using the code

Using the code should be quite straightforward, reference the library (or drop it on your toolbox if you wish), and then add the control to you form. All of the exposed properties through the property grid should be sufficient to set the control.

Points of Interest

One of the trickiest bits was adding a 3D-border to the items container. For more details please have a look in StatusItemPane.cs.

The funny thing is that after I went through the trouble of researching and spending a good few hours on getting it right, I looked at the resulting UI and didn't quite like it. So by default the border is off.

There are number of extra improvements which can be made (no limits to perfection). One is that StatusItem visual properties (like image, forecolor, etc.) may be moved off to a separate style object. But I guess I will leave it up to you, or may fix it in future (if there is enough interest in the control).

I would like to be able to click on the control and be able to scroll (if it is in scrollable mode)using the mouse wheel. However, to date I didn't have time to research that direction. If anyone has a solution I would like to hear it from you.

History

2007-04-23: version 1.0.0.0.

Credits

"Thank you" goes to Shapour for the original work.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionLicence Pin
Julian-w30-Dec-07 4:22
Julian-w30-Dec-07 4:22 
GeneralRe: Licence Pin
Igor Velikorossov1-Jan-08 0:33
Igor Velikorossov1-Jan-08 0:33 
GeneralRe: Licence Pin
Julian-w1-Jan-08 1:49
Julian-w1-Jan-08 1:49 
QuestionAutoscroll and adding items during runtime Pin
OKA13327-Dec-07 4:20
OKA13327-Dec-07 4:20 
GeneralRe: Autoscroll and adding items during runtime Pin
Igor Velikorossov27-Dec-07 13:22
Igor Velikorossov27-Dec-07 13:22 
QuestionHow to AddRange Pin
OKA1335-Oct-07 4:46
OKA1335-Oct-07 4:46 
AnswerRe: How to AddRange Pin
Igor Velikorossov10-Oct-07 14:12
Igor Velikorossov10-Oct-07 14:12 
GeneralBrilliant... Pin
Gismow23-May-07 23:11
Gismow23-May-07 23:11 
GeneralRe: Brilliant... Pin
Igor Velikorossov24-May-07 15:57
Igor Velikorossov24-May-07 15:57 
GeneralVery Well Done Pin
Smith55js22-May-07 15:58
Smith55js22-May-07 15:58 
GeneralRe: Very Well Done Pin
Igor Velikorossov24-May-07 15:57
Igor Velikorossov24-May-07 15:57 
GeneralNicely Done Pin
merlin9811-May-07 4:34
professionalmerlin9811-May-07 4:34 
GeneralRe: Nicely Done Pin
Igor Velikorossov1-May-07 13:29
Igor Velikorossov1-May-07 13:29 
GeneralNice Pin
Nenad L.23-Apr-07 22:40
Nenad L.23-Apr-07 22:40 
GeneralRe: Nice Pin
Igor Velikorossov24-Apr-07 17:26
Igor Velikorossov24-Apr-07 17:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.