Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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:

 

http://www.bc3tech.net/progress.gif

 

brandon

  • *Experts*
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...