Dacto
Dacto

Reputation: 2911

Progressbar in listbox?

I have a listbox that contains a bunch of file downloads, i want to add a progress bar to the current download to let the user know the progress of the download. I cannot figure out how to do this.

Upvotes: 1

Views: 1176

Answers (2)

Shay Erlichmen
Shay Erlichmen

Reputation: 31928

Why ListBox? Use ListView, with a simple Google you find ton of ListView+Progress Bars.

Upvotes: 0

Nir
Nir

Reputation: 29584

You need to use owner drawn list box

Use a normal ListBox and set DrawMode = DrawMode.OwnerDrawFixed and handle the two events MeasureItem and DrawItem.

The downside is that you have to take care of all the drawing yourself, but at least text and a progress bar are easy to draw.

Upvotes: 1

Related Questions