Back

How to change the Gauges kind (Type):

This example has a Gauge Component, and a RadioGroup Component on a form.
Give the RadioGroup Component 4 items, make the item's captions the following:

Horizontal Bar
Needle
Pie
Vertical Bar

Put the following code in the RadioGroup Component's OnClick Event:

procedure TForm1.RadioGroup1Click(Sender: TObject);
var I : Integer;
begin
    case RadioGroup1.ItemIndex of
       0 : Gauge1.Kind := gkHorizontalBar;
       1 : Gauge1.Kind := gkNeedle;
       2 : Gauge1.Kind := gkPie;
       3 : Gauge1.Kind := gkVerticalBar;
  end;

  for I := 1 to 60 do
   begin
      Gauge1.Progress := I;
   end;
end;


Back