How to show a text showing the progress in percentage on a Progres

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone
I want to show the progress in percentage over a progress bar, like it is
used in many of the installation programs, like
if the background color of the progress bar is white and the text is showing
"0%" then text is in blue color
When the progress is "100%" the background color of the progress bar is
blue, so I want the text showing "100%" should come with white color

and when the progress is say "50%" then the background color of the progress
bar will be half blue and half white, in this case I want the text showing
"50%" should come as "5" in white color and "0%" as blue color, as if the
text is showing the invert color of the background
Is it possible?
 
i am not sure that the default progress bar component would suffice the
requirement.
though i dont think its too difficult writing you custom progress bar.
use a panel if it helps but you will need 2 Label controls.
At run time you will have a progress property where you set the percent
in that property implement the width of each label based on percentage.
the background of one will be blue and the other white (the labels)

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
but in that case, I do not think I will be able to control the invert text
color like, if the progress is 48% then half of the text "4" is in white and
the rest part of the text "4" is in blue color, can I do that?
 
use a panel with background white.
You will have a label for percentage which will should be set to transparent
background. The position of this label is fixed. And it should always be on
the top.
The label with will give the visual indication of percentage should be a
child of the panel. It will have background color of blue. the width of this
will be equivalent of the percentage process.
That should be it

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
Let me do that
Thanks

Hermit Dave said:
use a panel with background white.
You will have a label for percentage which will should be set to transparent
background. The position of this label is fixed. And it should always be on
the top.
The label with will give the visual indication of percentage should be a
child of the panel. It will have background color of blue. the width of this
will be equivalent of the percentage process.
That should be it

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
Back
Top