53 lines
927 B
ObjectPascal
53 lines
927 B
ObjectPascal
unit Unit1;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
|
ATSynEdit, ATSynEdit_Keymap_Init;
|
|
|
|
type
|
|
{ TForm1 }
|
|
|
|
TForm1 = class(TForm)
|
|
procedure Button1Click(Sender: TObject);
|
|
procedure FormCreate(Sender: TObject);
|
|
private
|
|
{ private declarations }
|
|
ed: TATSynEdit;
|
|
public
|
|
{ public declarations }
|
|
end;
|
|
|
|
var
|
|
Form1: TForm1;
|
|
|
|
implementation
|
|
|
|
{$R *.lfm}
|
|
|
|
{ TForm1 }
|
|
|
|
procedure TForm1.FormCreate(Sender: TObject);
|
|
begin
|
|
ed:= TATSynEdit.Create(Self);
|
|
ed.Parent:= Self;
|
|
ed.Font.Name:= 'Courier New';
|
|
ed.Align:= alClient;
|
|
ed.OptUnprintedVisible:= false;
|
|
ed.OptRulerVisible:= false;
|
|
ed.Colors.TextBG:= $e0f0f0;
|
|
ed.LoadFromFile(ExtractFilePath(Application.ExeName)+'unit1.pas');
|
|
end;
|
|
|
|
procedure TForm1.Button1Click(Sender: TObject);
|
|
begin
|
|
ed.OptCaretBlinkEnabled:= not ed.OptCaretBlinkEnabled;
|
|
ed.SetFocus;
|
|
end;
|
|
|
|
end.
|
|
|