ProgressBar with Text?

bc3tech

Newcomer
Joined
Dec 31, 1969
Messages
13
Location
Ames, IA
I am wondering how it would be possible to create a progress bar on a form that will allow me to change text directly on top of the bar as the bar updates. right now i am doing this by positioning a label on top of the progressBar and changing the text in the label (which works alright) but the label, as you can see, is not transparent nor is it constantly centered or anything of the like on top of the bar. if you have ideas please post them! thanks. check out the image for details:

progress.gif


brandon
 
Well, the ProgressBar appears to be NonInheritable for some ungodly
reason, so I can't make a class of it and UserPaint it. Similarly, I
can use the CreateGraphics method of the progress bar and draw
directly on the progress bar, but because the Paint event comes
after the form's or whatever, the text goes behind the little
blocks that make up the progress bar.

I could get into old fasioned API methods, but I think it would be
more trouble than it's really worth. I would say either put the label
above the progress bar, or just code your own UserControl.
ProgressBars are among the simplest controls to code yourself.
 
Back
Top