unit U_operasiTeks;
interface
uses
Windows, Messages, SysUtils,
Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
ComboBox3: TComboBox;
Button1: TButton;
Button2: TButton;
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
RadioButton6: TRadioButton;
memo1: TMemo;
ComboBox4: TComboBox;
Button3: TButton;
procedure FormCreate(Sender:
TObject);
procedure
Button1Click(Sender: TObject);
procedure
Button2Click(Sender: TObject);
procedure
ComboBox1Change(Sender: TObject);
procedure
ComboBox2Change(Sender: TObject);
procedure
ComboBox3Change(Sender: TObject);
procedure
RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender:
TObject);
procedure
RadioButton3Click(Sender: TObject);
procedure
RadioButton4Click(Sender: TObject);
procedure
RadioButton5Click(Sender: TObject);
procedure
RadioButton6Click(Sender: TObject);
procedure ComboBox4Change(Sender:
TObject);
procedure
Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
combobox1.Items:=screen.Fonts;
combobox1.Text:='-PILIH FONTS-';
combobox2.Text:='-PILIH SIZE-';
combobox3.Text:='-PILIH BACK KOLOR-';
end;
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.ComboBox1Change(Sender: TObject);
begin
memo1.Font.Name:=combobox1.Text;
end;
procedure TForm1.ComboBox2Change(Sender: TObject);
begin
memo1.Font.Size:=strtoint(combobox2.Text);
end;
procedure TForm1.ComboBox3Change(Sender: TObject);
begin
if combobox3.Text='merah'then
memo1.Color:=clred
else if combobox3.Text='biru'then
memo1.Color:=clblue
else memo1.Color:=clgreen;
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;
procedure TForm1.ComboBox4Change(Sender: TObject);
begin
if combobox4.Text='bold' then
memo1.Font.Style:=memo1.Font.Style+[fsBold]
else if combobox4.Text='italic' then
memo1.Font.Style:=memo1.Font.Style+[fsItalic]
else if combobox4.Text='underline' then
memo1.Font.Style:=memo1.Font.Style+[fsUnderline]
else if combobox4.Text='strikeout' then
memo1.Font.Style:=memo1.Font.Style+[fsStrikeOut]
else
memo1.Font.Style:=memo1.Font.Style-[fsBold,fsItalic,fsUnderline,fsStrikeOut];
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;
0 komentar:
Post a Comment