Open Kriggi opened 5 years ago
@Kriggi
...
initialization
TStyleManager.Engine.RegisterStyleHook(TProgressBar, TStyleHook);
finalization
TStyleManager.Engine.UnRegisterStyleHook(TProgressBar, TStyleHook);
end.
Add this to the bottom of your main unit file
Hi Rodrigo! The component ProgressBar have a 'State' property: npbsNormal, npbsError, npbsPaused.
Example#1
If enable VCL Style all State property of the bar have one color
Example#2
How can I change the color of the bar in accordance with the 'State' property?
I found a procedure TSysProgressBarStyleHook.PaintBar(Canvas: TCanvas) in the Vcl.Styles.Utils.ComCtrls.pas file and added code
but it doesn't work.