-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxcsynedit.pas
44 lines (35 loc) · 954 Bytes
/
xcsynedit.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
unit xcsynedit;
{$mode objfpc}{$H+}
interface
uses
Classes, StdCtrls, SysUtils, Controls, SynEdit, SynEditTypes, INIFiles;
type
TXCSynEdit = class(TSynEdit)
private
sFilename: string;
public
constructor Create(theComponent: TComponent); override;
property Filename: string read sFilename write sFilename;
end;
implementation
constructor TXCSynEdit.Create(theComponent: TComponent);
var Ini : TIniFile;
begin
inherited Create(theComponent);
Name := 'Editor';
Align := alClient;
Lines.Clear;
Keystrokes.Delete(45);
RightEdge := 0;
Options := Options + [eoTabIndent];
Options := Options - [eoSmartTabs];
ScrollBars := ssAutoBoth;
Ini := TIniFile.Create(GetAppConfigFile(false));
with Ini do begin
Font.Name := ReadString('Editor', 'Font', Font.Name);
Font.Size := ReadInteger('Editor', 'Size', Font.Size);
TabWidth := ReadInteger('Editor', 'TabWidth', TabWidth);
end;
Ini.Free;
end;
end.