1. . Caption .
2. ActionList1. ImageList1 Images ActionList1.
3. ImageList1 . ImageList1 . ImageList1 ImageList. ( ), , .
, , , . , , \Program Files\Common Files\Borland Shared\Images\Buttons.
, . , , , , . , , . : Bitmap dimensions for are greater then imagelist dimensions. Separate into separate bitmaps? ( . ?). , . . . , , , .
. , , .., . , .
4. ActionList1 , ( Form1->ActionList1), . : . : . . . . : : Action1, Action2, Action3.
|
|
5. Action1. Action1 : Caption &, Hint 35, ImageIndex 0, Name AMatr, ShortCut Ctrl+A. Action2: Caption &, Hint , ImageIndex 1, Name ATrans, ShortCut Ctrl+B. Action3: Caption &, Hint Memo1, ImageIndex 2, Name ADel, ShortCut Ctrl+C.
6. : OnExecute, OnUpdate OnHint. OnExecute , , , ( , ), . , . OnUpdate . , . OnUpdate - , - . OnHint , , , . OnUpdate OnHint .
7. Memo1. (Font) Courier, , 12.
8. OnExecute ():
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
int r[50][50],a[50][50],n=3,m=5;
AnsiString s[50][50],s1[50];
//---------------------------------------------------------------------------
void __fastcall TForm1::AMatrExecute(TObject *Sender)
{
int i,j;
for(i=0;i<n;i++)
for(j=0;j<m;j++)
r[i][j]=random(10);
Memo1->SetFocus();
Memo1->Clear();
for(i=0;i<n;i++){
s1[i]="";
for(j=0;j<m;j++){
s[i][j]=" "+IntToStr(r[i][j]);
s1[i]+=s[i][j];}
Memo1->Lines->Add(s1[i]);}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ATransExecute(TObject *Sender)
{
int i,j;
for(i=0;i<n;i++)
for(j=0;j<m;j++)
a[j][i]=r[i][j];
i=n;n=m;m=i;
Memo1->SetFocus();
Memo1->Clear();
for(i=0;i<n;i++){
s1[i]="";
for(j=0;j<m;j++){
s[i][j]=" "+IntToStr(a[i][j]);
s1[i]+=s[i][j];}
Memo1->Lines->Add(s1[i]);}
i=n;n=m;m=i;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ADelExecute(TObject *Sender)
{
Memo1->Clear();
}
//---------------------------------------------------------------------------
7. MainMenu1. Images ImageList1. MainMenu1 Form1-> MainMenu1 . Caption &. Action : AMatr, ATrans, ADel. , . , , . , Action , .
|
|
8. Win32 ToolBar1. , Align alTop. Align=alNone, .
9. Hint , Images ImageList1, ShowCaptions ShowHint true. ToolBar1 . Action AMatr, ShowHint true. , Action ATrans, ADel, ShowHint true. , .
10. BitBtn. BitBtn Button . Action AMatr, ATrans, ADel , ShowHint true. BitBtn.
11. . .
. TActionLink . , Caption, Checked, HelpContext, Hint, ImageIndex, ShortCut, Visible. . TActionLink , . , . , .
. , ( ). . 26 . ( ), ( ), ( ), ( ), ( ) . , .
1. . Caption .
2. ActionList1 ImageList1. Images ActionList1 ImageList1. , , TFileExit , OK.
3. , , , ImageList1 . ImageList1 , .
|
|
4. , , TAction. . , : (Caption), (Hint), (ShortCut). , OnExecute. , , . OnExecute, , .. , . ToolBar1 Images ImageList1. ToolBar1 ShowHint true.
5. , . Action .
6. RichEdit1 Edit1.
7. . , . : , ; , . , , , (Copy), (Cut), (Delete). - , (Undo). , , .
8. , , , FileExit1, , Ctrl+E. ToolBar1 (Visible = false) . . . Ctrl+E, .