Click here to Skip to main content
13,250,182 members (67,581 online)
Click here to Skip to main content
Add your own
alternative version


70 bookmarked
Posted 9 Sep 2005

Progress Task List Control

, 12 Sep 2005
Rate this:
Please Sign up or sign in to vote.
A simple control to display a list of tasks, being ticked off as they are completed by the program.

Sample Image


With some tasks, you just need a progress bar to tell the user how fast a task is going. You may have used a label or status bar with a progress bar, to tell the user what task is currently being performed. This control shows all the tasks that need to be performed, and ticks them off one by one as they are completed.

Using the code

It's very easy to use this control. Just add a reference in your Windows Forms project to ProgressTaskList.dll (contained in the source and demo projects). If it doesn't appear in the VS toolbox, you can right-click and 'Add/Remove Items', browse to the DLL and click OK. Then simply drag it on to your form surface.

You can set the tasks through the Visual Studio designer. See the 'TaskItems' property, and click the (Collection) button to edit the items. Put one task on each line.

Alternatively, you can set the tasks programmatically:

// To add items programatically, use the following syntax:
this.progressTaskList1.TaskItems.AddRange(new string[]{"Loading", 
       "Initialising", "Whatever", "Saving"});

// or you can just use the normal Add() method

You need to call Start() to draw the tasks in the control, and after that call NextTask() whenever a task is completed, to advance to the next task.

Points of Interest

I was amazed to find that the Panel control has a built-in function called ScrollControlIntoView which ensures that the specified control is visible. I was about to go and write my own one, but lo and behold it was there. I used this method to ensure that the current task is always visible. As can be seen in the screenshot to the right, if there are too many tasks to fit in the panel surface, the control handles scrolling gracefully, thanks to the AutoScroll property of the Panel.

How it works

The control has a property called TaskItems which is a string[], corresponding to the tasks needing to be performed. I should point out that there is no link between the control and the thread running the task. So in order to update the control to the next task, the program must call NextTask() on the control after each task is complete.

When the Start() method is invoked on the control, the labels are created dynamically and added to the panel. Each label has an image on its left hand side, which changes from an arrow to a tick when the task is finished.

It's quite simple really. The hardest part (by far) was getting the TaskItems collection property to work through the VS designer. It was a useful exercise in control design.


Feel free to use this control and modify it as you please. If you have the time, post any improvements you make to the control here (as a comment), and I'll update the article.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
Ireland Ireland
No Biography provided

You may also be interested in...


Comments and Discussions

QuestionSource Code VB Pin
rgaspar3-Apr-09 4:54
memberrgaspar3-Apr-09 4:54 
AnswerRe: Source Code VB Pin
Tim_Mackey3-Apr-09 7:17
memberTim_Mackey3-Apr-09 7:17 
GeneralRe: Source Code VB Pin
rgaspar3-Apr-09 11:33
memberrgaspar3-Apr-09 11:33 
GeneralCommercial Usage Pin
Eric SE26-Jul-07 17:11
memberEric SE26-Jul-07 17:11 
GeneralRe: Commercial Usage Pin
Tim_Mackey26-Jul-07 22:50
memberTim_Mackey26-Jul-07 22:50 
GeneralMessage Closed Pin
27-Dec-10 9:43
memberoutpan27-Dec-10 9:43 
QuestionImages Pin
salsafyren228-Mar-06 1:19
membersalsafyren228-Mar-06 1:19 
AnswerRe: Images Pin
Tim_Mackey28-Mar-06 1:23
memberTim_Mackey28-Mar-06 1:23 
QuestionAbout BeginInvoke()? Pin
firerainbow7-Oct-05 4:56
memberfirerainbow7-Oct-05 4:56 
AnswerRe: About BeginInvoke()? Pin
Tim_Mackey7-Oct-05 6:40
memberTim_Mackey7-Oct-05 6:40 
GeneralRe: About BeginInvoke()? Pin
firerainbow8-Oct-05 6:06
memberfirerainbow8-Oct-05 6:06 
GeneralSource & Demo File Names Pin
fwsouthern15-Sep-05 19:00
memberfwsouthern15-Sep-05 19:00 
AnswerRe: Source & Demo File Names Pin
Tim_Mackey16-Sep-05 0:16
memberTim_Mackey16-Sep-05 0:16 
GeneralRe: Source & Demo File Names Pin
fwsouthern16-Sep-05 17:47
memberfwsouthern16-Sep-05 17:47 
GeneralVery cool Pin
Tomasz Bekasiewicz12-Sep-05 12:43
memberTomasz Bekasiewicz12-Sep-05 12:43 
AnswerRe: Very cool Pin
Tim_Mackey12-Sep-05 12:59
memberTim_Mackey12-Sep-05 12:59 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171114.1 | Last Updated 12 Sep 2005
Article Copyright 2005 by Tim_Mackey
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid