-
, 2004 .
1 ........................................................................................... 3
1. ........................................................................................................ 3
2. Label ( Standard)...................................................................................................... 4
3. Edit ( Standard)............................................................................. 4
4. Button, BitBtn ( Standard, Additional)................................................................. 5
5. CheckBox ( Standard)....................................................................................... 5
6. GroupBox, RadioButton ( Standard)............................................................ 6
7. ComboBox ( Standard)..................................................................................... 6
2 ..................................................................... 9
1. Timer ( System)................................................................................................. 9
2. PageControl ( Win32)...................................................................................... 10
3. DateTimePicker ( Win32)................................................................................ 10
4. TrackBar ( Win32)........................................................................................... 11
5. UpDown ( Win32)........................................................................................... 12
6. ProgressBar (Win32)............................................................................................................................ 13
3 ............................................................................. 15
1. Memo (Standart) RichEdit ( Win32).............. 15
2. ................................................................................................ 16
3. MainMenu pupMenu ( Standart)............................................................... 16
4. ............................................................. 16
5. ................................................................................ 18
6. ....................................................................................................... 18
7. ......................................................................... 19
|
|
8. ........................................................................................ 19
9. ..................... 19
4 . 22
1. ImageList ( Win32)......................................................................................... 22
2. TreeView ( Win32).......................................................................................... 22
3. ListView ( Win32)........................................................................................... 25
4. OpenDialog ( Dialogs)..................................................................................... 26
5. FontDialog ( Dialogs)...................................................................................... 26
6. ColorDialog ( Dialogs).................................................................................... 27
5 .......................................................... 28
1. (*.rtf)................................................................................... 29
2. (*.cnt)................................................................................................. 31
3. ................................................................................................................... 32
4. ...................................................................... 32
................................................................................................................... 33
1
, , .
: Label, Edit, Button, BitBtn, ComboBox, CheckBox, GroupBox, RadioButton
1.
C++ Builder , . () (). - C++ Builder. ( C++ Builder), . , .
, , , , .
:
- (Standard, Win32 .).
- (, Edit).
- , .
- , .
( *.h, ).
|
|
3 : , . , . (, ).
, (, ). - . (Object Inspector) (Properties) (Events). , Events . . , .
, . , ->.
:
¨ Name ;
¨ Color ;
¨ Font (, , );
¨ Visible , .
¨ Enabled
2. Label ( Standard)
. . OnClick , . :
¨ Caption , .. ,
¨ Alignment
ú taLeftJustify
ú taRightJustify -
ú taCenter
¨ AutoSize , . true, .
¨ Transparent. true , .
Caption AnsiString, , Text Edit. . :
{ Label1->Caption = " "; }
3. Edit ( Standard)
, .
OnChange , . :
¨ Text ,
¨ MaxLength ( 0 )
¨ AutoSelect ,
Text AnsiString. , Text , , ,
{Edit1->Text=; }
, SetFocus() AutoSelet true.
TEdit:
¨ IntToStr ( int ) - .
¨ StrToFloat ( const AnsiString S ) -
¨ StrToInt ( const AnsiString S ) - .
|
|
.
void __fastcall TForm1::Button1Click(TObject *Sender)
{ int i;
Edit1->Text = IntToStr (24);
i = StrToInt (Edit1->Text);
}
, , +. , i, , Edit2 :
{ Edit2->Caption = " : "+IntToStr (i); }
4. Button, BitBtn ( Standard, Additional)
, . BitBtn Button . , . OnClick, . :
¨ Caption
¨ Cancel. true, Esc . , true .
¨ Default. true, Enter .
BitBtn. Glyph. Glyph , . Load .bmp, . , C++ Builder, \Program Files\ Common Files\ Borland Shared\ lmages\ Buttons. .
1616, : - , - , Enabled false, .
Kind BitBtn . , bkCustom ( ), . , :bkOK, bkCancel, bkClose .
5. CheckBox ( Standard)
- ( ). OnClick. :
¨ Caption
¨ Checked , . Checked true,
¨ State (, , )
¨ AllowGrayed
: , ( ) . State: cbChecked, cbGrayed, cbUnchecked, AllowGrayed true. AllowGrayed =false ( ), : . State, AllowGrayed .
v . , . CheckBox1, Button1 . , , Checked, .. , (Checked=false). , .. Click, :
|
|
{ Button1->Enabled=CheckBox1->Checked;}
6. GroupBox, RadioButton ( Standard)
GroupBox , , (, ). Caption - .
, . OnClick. RadioButton:
¨ Caption
¨ Checked ,
, , Checked true . GroupBox, . , , , .
v . , - . . , RadioButton1. OnClick :
void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{ if (RadioButton1->Checked==true) Edit1->Color=clRed; }
7. ComboBox ( Standard)
. ( ) OnChange. :
¨ Text - ,
¨ Items . , Items. , .
¨ ItemIndex
¨ Sorted
¨ Style :
ú sSimple ;
ú sDropDown - ;
ú sDropDownList - ( )
, Text , , . Itemlndex, 0, . , Itemlndex = -1 ( ). OnCreate
{ ComboBox1->ItemIndex = 0; }
v . Label1, . ComboBox1 Items :
OnChange :
void __fastcall TForm1::ComboBox1Change(TObject *Sender)
{ Label1->Font->Size = StrToInt(ComboBox1->Text); }