Progressbar in Listbox

Is it possible to add a progress bar into a listbox cell?
If yes, please help me in the right direction.

Thank you.

You can implement your own with the CellBackgroundPaint event and a Timer that invalidates the cell. Use the CellTag to keep track of value and maximum. This is a common thing to do for showing a list of downloads, for example.

Ok, I’ll try that.

Thank you.

Maybe a dumb question, but what function should I use in the CellBackgroundPaint event to add my progressbar to the listbox.
I am a complete noob on altering the listboxes :frowning:

Thank you.

Check out my free MagicListbox that implements a progress bar.



That is not what I am looking for, but thanks for the offer.

You’re not adding an actual progressbar to the listbox. Rather, you are drawing a representation of the progress, just like a progressbar does. Calculate the amount of the cell to color in (based on the current value and the maximum value, like Brad suggested) and use g.FillRect to draw that portion of the cell.

Or do like progress bar does & just tile the actual image :stuck_out_tongue: