PDA

View Full Version : Progressbar with text


x-dream
02-23-2006, 05:24 PM
How do i get text in my progressbar like in flashfxp maybe author could paste his code from ffxp for this. Including the nice textcolor change when it progresses.

Thanks

EwarWoo
02-23-2006, 05:43 PM
Hehe.
And maybe he could make it open source too whilst hes at it. Not likely to happen bud ;)

kalieb
03-01-2010, 12:36 PM
the most easy way to make a progress bar with text inside is to use a picture box and place a transparent label inside.

bigstar
03-01-2010, 01:01 PM
I use a custom component that I wrote to get the desired effect in FlashFXP.

I basically do all the drawing myself. If the OS is themesd and blending is enabled then I create a gray scale mask of the themed progressbar and blend my own colors into it.

I could post the component however its written in Borland Delphi 4 and its not commented, it would require some changes to work with newer versions of delphi, since Delphi 4 doesn't support themes I use a 3rd party component to get the desired effect.

kalieb
03-01-2010, 01:11 PM
Public Sub PictureProgress(Shape As Control, done As Integer, total As Variant)
On Error Resume Next
Dim x As Integer
x = done / total * Shape.Width
Shape.Line (0, 0)-(Shape.Width, Shape.Height), RGB(176, 212, 255), BF
Shape.Line (0, 0)-(x - 10, Shape.Height), RGB(32, 84, 144), BF
Shape.CurrentX = (Shape.Width / 2) - 100
Shape.CurrentY = (Shape.Height / 2) - 125
Shape.ForeColor = RGB(150, 150, 150)
End Sub