1. ( File, New Application).
2. (Name) ( Form1) Editor ( , Caption ).
3. Delphi Project, Options, Application (Title) : Editor, ( Load Icon) \Program Files\ Common Files\ Borland Shared\ Images\ Icons... (Editor) . . , ( , , Project1) .
4. ( Icon Editor). , .
2.
1. . Bevel ( Additional). Height () 2, Align () alTop ( ). .
2. . Panel ( Standard), Height 32; Align alTop; Name ToolBar ( ) Caption; BevelOuter ( ) bvNone.
3. . ( !) SpeedButton ( Additional). (Name) FileOpenBtn ( ); Left 5; Alignment Palette ( View) (Center Vertically in Window). Glyph SpeedButton ( fileopen.bmp \Program Files\ Common Files\ Borland Shared\ Images\ Buttons).
4. 3 ( ). FileSaveBtn filesave.bmp Glyph.
3.
StatusBar ( Win32). . Name StatusBar, SimplePanel ( ) true. StatusBar SimpleText .
4.
1. Memo ( Standard). Name Memo. dz Memo Memo ( Lines). Align () alClient . ScrollBar ssVertical .
|
|
. Memo Lines , . Lines Count .
Lines : LoadFromFile; ( ) SaveToFile; ( ).
Modified () Memo , Modified false. ϳ Memo Modified false.
Memo Clear.
(Clipboard): CutToClipboard; , CopyToClipboard; , PasteFromClipboard; .
ᒺ ( ).
2. (File → Save All). .
5.
1. ( - ) MainMenu ( Standard) MainMenu. MainMenu (Editor.MainMenu) , ( ), Insert From Template , , File Menu .
2. 1 (Insert From Template) Edit Menu ( ) Help Menu ( ).
( Delete). File New, Open, Save, Save As, Exit; Edit Cut, Copy, Paste; Help About.
Edit ( Insert). (Name) EditSelectAll, Caption Select &All ( : Select A ll, Alt+A ).
( Caption Insert - Enter).
( ShortCut) : Ctrl+N New, Ctrl+S Save, Ctrl+O Open, Ctrl+A Select All.
6.
1. OpenDialog ( ) SaveDialog ( ) Dialogs. OpenDialog SaveDialog . FileName ( ), .
. , , . ij ColorDialog, FontDialog. , :
ColorDialog.Execute; //
Color:= ColorDialog.Color; //
ColorDialog Dialogs.
. Execute , true , Ok. :
|
|
If ColorDialog.Execute Then Color:= ColorDialog.Color;
.
.
2. FontDialog ( Dialogs) FontDialog.
SpeedButton ( Additional). ( font.bmp \ Program Files\ Common Files\ Borland Shared\ Images\ Buttons).
SpeedButton, :
If FontDialog.Execute Then //
// Memo ,
//
Memo.Font:= FontDialog.Font;
.
1. ? , ? , ?
2. ? ? ? ?
3. Memo ( , , , ). Windows.
4. . ? ? ? ? ? ?
5. ? , , .
5
: .
: 㳺 .
1. ³
Delphi. ³ , .
2.
1. .
( MessageBox), (, , ). :
Application.MessageBox( , ,
or );
Yes , No ͳ, Cancel , , MB_YESNOCANCEL.
(icon warning) MB_ICONWARNING.
MessageBox (IDYES, IDNO, IDCANCEL), .
New File :
procedure TEditor.New1Click(Sender: TObject);
Var Result: Integer;
begin
If Memo.Modified Then // Memo
begin // MessageBox
Result:= Application.MessageBox( ?,
ϳ ,