Page 78 - 4260
P. 78

{$R *.DFM}


           procedure TForm1.FormColorClick(Sender: TObject);
           begin
                  if ColorDialog1.Execute then Form1.Color:= ColorDialog1.Color;
           end;

           procedure TForm1.ShapeColorClick(Sender: TObject);
           begin
                  if ColorDialog1.Execute then  Shape1.Brush.Color:=
           ColorDialog1.Color;
           end;


           procedure TForm1.ScrollBar1Change(Sender: TObject);
           begin
                  Shape1.Width:= ScrollBar1.Position*3;
           end;

           procedure TForm1.ScrollBar2Change(Sender: TObject);
           begin
                  Shape1.Height:= ScrollBar2.Position*3;
           end;


           procedure TForm1.ComboBox1Click(Sender: TObject);
           var
                  Index: integer;
           begin
                  if ComboBox1.Text='stRectangle' then Index:=0;
                  if ComboBox1.Text='stSquare' then Index:=1;
                  if ComboBox1.Text='stRoundRect' then Index:=2;
                  if ComboBox1.Text='stRoundSquare' then Index:=3;
                  if ComboBox1.Text='stEllipse' then Index:=4;
                  if ComboBox1.Text='stCircle' then Index:=5;
                  Shape1.Shape:=TShapeType(Index);

                                          78
   73   74   75   76   77   78   79   80   81   82   83