Senin, 26 Maret 2012
tugas Aplikasi operasi teks
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.Text:=uppercase(edit1.Text);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
memo1.Text:=lowercase(edit1.Text);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
combobox3.Items:=screen.Fonts;
combobox3.Text:='-PILIH FONTS-';
end;
procedure TForm1.ComboBox3Change(Sender: TObject);
begin
memo1.Font.Name:=combobox3.Text;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if combobox1.text='merah'then memo1.color:=clred
else
if combobox1.text='biru'then memo1.color:=clblue
else
memo1.color:=clgreen;
end;
procedure TForm1.ComboBox2Change(Sender: TObject);
begin
if combobox2.text='8'then memo1.font.size:=8
else
if combobox2.text='10'then memo1.font.size:=10
else
if combobox2.text='12'then memo1.font.size:=12
else
if combobox2.text='14'then memo1.font.size:=14
else
if combobox2.text='16'then memo1.font.size:=16
else
memo1.font.size:=18;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
memo1.Font.Style:=memo1.Font.Style+[fsbold];
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
memo1.Font.Style:=memo1.Font.Style+[fsitalic];
end;
procedure TForm1.BitBtn3Click(Sender: TObject);
begin
memo1.Font.Style:=memo1.Font.Style+[fsunderline];
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
memo1.Text:='';
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
close;
end;
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
memo1.Font.Color:=clred;
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
memo1.Font.Color:=clgreen;
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
begin
memo1.Font.Color:=clyellow;
end;
procedure TForm1.RadioButton4Click(Sender: TObject);
begin
memo1.Font.Color:=clpurple;
end;
procedure TForm1.RadioButton5Click(Sender: TObject);
begin
memo1.Font.Color:=clblack;
end;
procedure TForm1.RadioButton6Click(Sender: TObject);
begin
memo1.Font.Color:=clblue;
end;
end.
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar