Ә ұқ
C++Builder құ қғ ң ө ң ұ ұ ү Standart ң ListBox, ComboBox қғ .
Standart ң ListBox, ComboBox . ListBox қ қ.
,
ComboBox1->Items.LoadFromFile(:\Gruppa\Family.txt);
ғ ұ
қ қ қ қ құ . Ә қ қ ң ә *.txt қ. Қ құ ң.
. Қ ү /4.5, 4.6, 4.7 / ұ. қ ө қ ң ө . ұ ә қ қ ә .
қ (Form1) ү ғ ә:
#include "Unit1.h"
#include "Unit2.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
4.5-. қ
4.6-.
4.7-. қ
// ң қғ өң
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Form2->Show();
}
// қ ң қғ өң
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Form3->Show();
}
// ң қғ өң
void __fastcall TForm1::Button3Click(TObject *Sender)
{
Form1->Close();
}
(Form2) ү ғ ә:
#include "Unit2.h"
#include "Unit1.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "SHDocVw_OCX"
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
// ɲͻ ң қғ өң
void __fastcall TForm2::Button1Click(TObject *Sender)
{
Form1->Show();
Form3->Hide();
Form2->Hide();
}
// ғ ListBox1 қғң
|
|
void __fastcall TForm2::ListBox1Click(TObject *Sender)
{
if (Form2->ListBox1->ItemIndex==0) M
Memo1->Lines->LoadFromFile(".txt");
(Form2->ListBox1->ItemIndex==1)
Memo1->Lines->LoadFromFile(".txt");
if (Form2->ListBox1->ItemIndex==2)
Memo1->Lines->LoadFromFile(".txt");
}
қ (Form3) ү ғ ә:
#include "Unit3.h"
#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "SHDocVw_OCX"
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
void __fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
// қ ғ ComboBox1 қғң
void __fastcall TForm3::ComboBox1Change(TObject *Sender)
{
if (ComboBox1->ItemIndex==0)
Memo1->Lines->LoadFromFile(".txt");
if (ComboBox1->ItemIndex==1)
Memo1->Lines->LoadFromFile(".txt");
}
//ɲͻ ң қғ өң
void __fastcall TForm3::Button1Click(TObject *Sender)
{
Form1->Show();
Form3->Close();
Form2->Hide();
}
Ө ұ
ҳ ә ң қ ә, қғ :
қ-ү үң ә ;
ң ә ә ;
қ қғң қ қ;
ʳғ қ қ;
ә ү ө ;
ә ө ;
ә ;
ң қ қ;
қ ;
Қғ ә қ ө - қ ;