dOnly:=NOT Memo1.ReadOnly; .Checked:=NOT ReadOnly1.Checked; TForm1.About1Click (Sender: TObject); (Application.MessageBox ( © Notepad Created By Andrew Carter, Copyright +2001 raquo ;, About Notepad? raquo ;, MB_OK)=IDOK) then ;; TForm1.Cut2Click (Sender: TObject) ;. CutToClipboard ;; TForm1.Copy2Click (Sender: TObject) ;. CopyToClipboard ;; TForm1.Paste2Click (Sender: TObject) ;. PasteFromClipboard ;; TForm1.SelectAll2Click (Sender: TObject) ;. SelectAll ;; TForm1.PopupMenu1Popup (Sender: TObject) ;: String;
{if some text is selected in the memo, the cut and copy commands} Memo1.SelLength gt; 0 then begin.Enabled:=True; .Enabled:=True; .Enabled:=False; .Enabled:=False ;;
{if the clipboard contains some text, the Paste command} Clipboard.HasFormat (CF_TEXT) then.Enabled:=True.Enabled:=False;:=Memo1.Text; Length (Trim (sMemo) ) gt; 0 then begin.Enabled:=True; .Enabled:=True; .Enabled:=False; .Enabled:=False ;;;