unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, CheckLst;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Panel1: TPanel;
Panel2: TPanel;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
RadioGroup1: TRadioGroup;
ComboBox1: TComboBox;
GroupBox1: TGroupBox;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
Panel7: TPanel;
Panel8: TPanel;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Button3: TButton;
RadioGroup2: TRadioGroup;
Button4: TButton;
ScrollBar1: TScrollBar;
ScrollBar2: TScrollBar;
ScrollBar3: TScrollBar;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
CheckListBox1: TCheckListBox;
procedure Button2Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure CheckListBox1Click(Sender: TObject);
procedure Panel3Click(Sender: TObject);
procedure Panel4Click(Sender: TObject);
procedure Panel5Click(Sender: TObject);
procedure Panel6Click(Sender: TObject);
procedure Panel7Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure ScrollBar1Change(Sender: TObject);
procedure ScrollBar2Change(Sender: TObject);
procedure ScrollBar3Change(Sender: TObject);
private
{ Private declarations }
public
end;
var
Form1: TForm1;
acolor : Tcolor;
lol : String;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
panel1.color := clwhite;
panel2.color := clwhite;
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
case radiogroup1.Itemindex of
0 : acolor := Tcolor($0000A5FF);
1 : acolor := clYellow;
2 : acolor := clgreen;
3 : acolor := clblue;
4 : acolor := clred;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if checkbox1.Checked then
panel1.Color := acolor;
if checkbox2.Checked then
panel2.color := acolor;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
case combobox1.itemindex of
0 : acolor := Tcolor($0000A5FF);
1 : acolor := clYellow;
2 : acolor := clblue;
3 : acolor := clgreen;
4 : acolor := clred;
end;
end;
procedure TForm1.CheckListBox1Click(Sender: TObject);
begin
case Checklistbox1.ItemIndex of
0 : acolor := Tcolor($0000A5FF);
1 : acolor := clyellow;
2 : acolor := clgreen;
3 : acolor := clblue;
4 : acolor := clred;
end;
end;
procedure TForm1.Panel3Click(Sender: TObject);
begin
acolor := Tcolor($0000A5FF);
end;
procedure TForm1.Panel4Click(Sender: TObject);
begin
acolor := clyellow;
end;
procedure TForm1.Panel5Click(Sender: TObject);
begin
acolor := clgreen;
end;
procedure TForm1.Panel6Click(Sender: TObject);
begin
acolor := clblue;
end;
procedure TForm1.Panel7Click(Sender: TObject);
begin
acolor := clred;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
panel3.color := Tcolor($0000A5FF);
panel4.color := clyellow;
panel5.color := clgreen;
panel6.color := clblue;
panel7.color := clred;
radiogroup2.Itemindex := 0;
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
LowerCase(edit1.text);
if (edit1.text = 'orange') or (edit1.text = 'ORANGE') then
acolor := Tcolor($0000A5FF);
if (edit1.text = 'yellow') or (edit1.text = 'YELLOW') then
acolor := clyellow;
if (edit1.text = 'green') or (edit1.text = 'GREEN') then
acolor := clgreen;
if (edit1.text = 'blue') or (edit1.text = 'BLUE') then
acolor := clblue;
if (edit1.text = 'red') or (edit1.text = 'RED') then
acolor := clred;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
case radiogroup2.ItemIndex of
0 : begin
edit1.Visible := true;
label3.Visible := true;
label4.Visible := true;
label5.Visible := true;
label6.Visible := true;
label7.Visible := true;
end;
1 : Combobox1.Visible := true;
2 : checklistbox1.Visible := true;
3 : groupbox1.Visible := true;
4 : radiogroup1.Visible := true
end;
radiogroup2.visible := false;
checkbox1.visible := true;
checkbox2.visible := true;
button1.visible := true;
button2.visible := true;
button4.visible := true;
button3.Visible := false;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
radiogroup2.Visible := true;
button4.visible := false;
button3.Visible := true;
edit1.Visible := false;
label3.Visible := false;
label4.Visible := false;
label5.Visible := false;
label6.Visible := false;
label7.Visible := false;
Combobox1.Visible := false;
checklistbox1.Visible := false;
groupbox1.Visible := false;
radiogroup1.Visible := false;
checkbox1.visible := false;
checkbox2.visible := false;
button1.visible := false;
button2.visible := false;
panel1.color := clwhite;
panel2.color := clwhite;
end;
procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
lol := '$0000FF'+' $FF0000'+'RGB(0,255,0)' ;
panel1.color := $0000FF
end;
procedure TForm1.ScrollBar2Change(Sender: TObject);
begin
panel1.color := $FF0000;
end;
procedure TForm1.ScrollBar3Change(Sender: TObject);
begin
panel1.color := RGB(0,255,0);
end;
end.