TAB
|
OBJECT
|
PROPERTIES
|
ADDITIONAL
|
Label1
|
CAPTION=APLIKASI
OPERASI TEKS
|
LABEL2
|
CAPTION=INPUT
KATA
|
|
EDIT1
|
TEXT=KOSONGKAN
|
|
MEMO1
|
ENABLED=TRUE
|
|
BUTTON1
|
caption=&UPPERCASE
|
|
BUTTON2
|
caption=&LOWERCASE
|
|
GROUPBOX1
|
CAPTION=FONT
COLOR
|
|
RADIO
BUTTON1
|
CAPTION=RED,FONTCOLOR=CLRED
|
|
RADIOBUTTON2
|
CAPTION=GREEN,FONTCOLOR=CLGREEN
|
|
RADIO
BUTTON3
|
CAPTION=YELLOW,FONTCOLOR=CLYELLOW
|
|
RADIO
BUTTON4
|
CAPTION=PURPLE,FONTCOLOR=CLPURPLE
|
|
RADIO
BUTTON5
|
CAPTION=BLACK,FONTCOLOR=CLBLACK
|
|
RADIO
BUTTON6
|
CAPTION=BLUE,FONTCOLOR=CLBLUE
|
|
COMBOBOX1
|
TEXT=KOSONGKAN
|
|
COMBOBOX2
|
TEXT=KOSONGKAN
|
|
COMBOBOX3
|
ITEMS=MERAH,BIRU,HIJAU;TEXT=KOSONGKAN
|
|
STANDARD
|
CHECKBOX1
|
CAPTION=BOLD
|
CHECHBOX2
|
CAPTION=ITALIC
|
|
CHECKBOX3
|
CAPTION=UNDERLINE
|
LISTING PROGRAM
private
{
Private declarations }
public
{
Public declarations }
end;
var
Form1:
TForm1;
implementation
{$R *.dfm}
procedure TForm1.Edit1Change(Sender: TObject);
begin
memo1.Font.Name:=combobox1.Text;
end;
procedure TForm1.RadioButton2Click(Sender:
TObject);
begin
memo1.Font.Color:=clgreen;
end;
procedure TForm1.RadioButton6Click(Sender:
TObject);
begin
memo1.Font.Color:=clpurple;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
combobox1.Items:=screen.Fonts;
combobox1.Text:='-PILIH FONTS-';
combobox2.Text:='-PILIH SIZE-';
combobox3.Text:='-PILIH BACK COLOR-';
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.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.RadioButton3Click(Sender:
TObject);
begin
memo1.Font.Color:=clyellow;
end;
procedure TForm1.RadioButton5Click(Sender:
TObject);
begin
memo1.Font.Color:=clblack;
end;
procedure TForm1.RadioButton4Click(Sender:
TObject);
begin
memo1.Font.Color:=clblue;
end;
procedure TForm1.Button3Click(Sender:
TObject);
begin
if application.messagebox('yakin
keluar?','konfirmasi',36)=idyes then
begin
close;
end;
end;
procedure TForm1.ComboBox1Change(Sender:
TObject);
begin
memo1.Font.name:=combobox1.Text;
end;
procedure TForm1.CheckBox1Click(Sender:
TObject);
begin
if checkbox1.Checked=true then
begin
memo1.Font.Style:=memo1.Font.Style+[fsbold];
end
else
begin
memo1.Font.Style:=memo1.Font.Style-[fsbold];
end;
end;
procedure TForm1.CheckBox2Click(Sender:
TObject);
begin
if
checkbox2.Checked=true then
begin
memo1.Font.Style:=memo1.Font.Style+[fsitalic];
end
else
begin
memo1.Font.Style:=memo1.Font.Style-[fsitalic];
end;
end;
procedure TForm1.CheckBox3Click(Sender:
TObject);
begin
if
checkbox3.Checked=true then
begin
memo1.Font.Style:=memo1.Font.Style+[fsunderline];
end
else
begin
memo1.Font.Style:=memo1.Font.Style-[fsunderline];
end;
end;
end.
Tidak ada komentar:
Posting Komentar