Pull to refresh

Comments 2

Alternate on Delphi)

procedure SetProgressArc(Control: TStyledControl; const Value: Integer);
begin
  var Angle := 184 / 100 * Value;
  Control.StylesData['arc1.EndAngle'] := Angle;
  Control.StylesData['arc2.EndAngle'] := Angle;
  Control.StylesData['arc3.EndAngle'] := Angle;
  Control.StylesData['arc4.EndAngle'] := Angle;
  Control.StylesData['arc5.EndAngle'] := Angle;
  Control.StylesData['arc6.EndAngle'] := Angle;
  Control.StylesData['arc7.EndAngle'] := Angle;
  Control.StylesData['arc8.EndAngle'] := Angle;
  Control.StylesData['arc9.EndAngle'] := Angle;
end;

procedure TForm4.TrackBar1Change(Sender: TObject);
begin
  Label1.Text := Trunc(TrackBar1.Value).ToString + '%';
  SetProgressArc(Label1, Trunc(TrackBar1.Value));
end;

Sign up to leave a comment.

Articles