1shape,1radioGroup,3RadioButton,1Trackbar,1Scrollbar,1ComboBox ekleyin,RadioGroup’un içinde şekiller yer alsın,ComboBox’un içinde renkler yer alsın,Scrollbar ve TrackBar da o şekli büyütüp küçültsün. Bu programın kodu.
Kodu;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
case ComboBox1.ItemIndex of
0: shape1.Brush.Color := clred;
1: shape1.Brush.Color := clblue;
2: shape1.Brush.Color := clgreen;
3: shape1.Brush.Color := clyellow;
4: shape1.Brush.Color := clwhite;
5: shape1.Brush.Color := clblack;
end;
end;
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
shape1.Shape := stSquare;
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
shape1.Shape:=stCircle;
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
begin
shape1.Shape:=stRoundSquare;
end;
procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
shape1.width:=scrollbar1.Position * 5 ;
shape1.height:=scrollbar1.Position * 5 ;
end;
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
shape1.width:=trackbar1.Position * 5 ;
shape1.height:=trackbar1.Position * 5 ;
end;
end.

Hiç yorum yok:
Yorum Gönder