h>
#pragma hdrstop
#include "LT2.h"
//--------------------------------------------------------------------------#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//--------------------------------------------------------------------------__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------String Religion;
void __fastcall TForm1::FormCreate(TObject *Sender)
{
StringGrid1->Hide();
Button3->Hide();
ComboBox1->Items->Add("Pilih Hobimu");
ComboBox1->Items->Add("Membaca");
ComboBox1->Items->Add("Renang");
ComboBox1->Items->Add("Belajar");
ComboBox1->Items->Add("Bulutangkis");
StringGrid1->Cells[0][0]
StringGrid1->Cells[1][0]
StringGrid1->Cells[2][0]
StringGrid1->Cells[3][0]
StringGrid1->Cells[4][0]
=
=
=
=
=
"No.";
"NIM";
"Nama";
"Agama";
"Hobi";
}
//--------------------------------------------------------------------------int i=0;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
StringGrid1->ColCount = 5;
StringGrid1->RowCount = i+2;
i = i+1;
StringGrid1->Cells[0][i]
StringGrid1->Cells[1][i]
StringGrid1->Cells[2][i]
StringGrid1->Cells[3][i]
StringGrid1->Cells[4][i]
=
=
=
=
=
IntToStr(i);
Edit1->Text;
Edit2->Text;
Religion;
ComboBox1->Text;
Edit1->Text="";
Edit2->Text="";
ComboBox1->ItemIndex = 0;
RadioButton1->Checked=false;
RadioButton2->Checked=false;
RadioButton3->Checked=false;
RadioButton4->Checked=false;
}
//--------------------------------------------------------------------------void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{
Religion = "Islam";
}