Unit colorprogressbar;
Interface
Uses Classes, Comctrls, Graphics, Controls, Windows
type TcolorProgressBar = class (TprogressBar) private {Private declarations} Fcolor: Tcolor; procedure SetColor (Value: TColor); protected {Protected declarations} public {Public declarations} procedure SetParent (AParent: TWinControl); override; published {Published declarations} property Tcolor Read Fcolor Write SetColor Default CLBLUE; END;
PROCEDURE register;
IMPLEMentation
Procedure Register; Begin RegisterComponents ('KaguovCl', [TcolorProgressBar]); END;
{Tcolorprogressbar}
Procedure TcolorProgressBar.SetColor (Value: tcolor); Begin if fcolor: value dam fcolor: = value; if self.parent <> NIL THEN PostMessage (Self.handle, $ 0409, 0, Fcolor); End;
Procedure TcolorProgressBar.SetParent (Aparent: TwinControl); Begin Inherited; if Aparent <> NIL THEN PostMessage (Self.handle, $ 0409, 0, Fcolor);
End.