Advertisement
WarPie90

Syntax colors - Simba

Jul 24th, 2018
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 17.45 KB | None | 0 0
  1. unit colorscheme;
  2.  
  3. {$mode objfpc}{$H+}
  4. {$modeswitch AdvancedRecords}
  5. interface
  6.  
  7. uses
  8.   SysUtils, Classes,
  9.   Forms, Controls, Graphics, Dialogs, StdCtrls,
  10.   Menus, ExtCtrls, SynEdit, SynEditTypes, ColorBox, Buttons,
  11.   newsimbasettings;
  12.  
  13. type
  14.   EEditorAttr = (
  15.     ecGutter, ecGutterLineNumberPart, ecGutterChangesPart, ecGutterCodeFoldPart,
  16.     ecGutterMarksPart,  ecGutterSeparatorPart,
  17.  
  18.     ecEdtior, ecRightEdge, ecLineHighlight, ecFoldedCode, ecFoldedCodeLine, ecBracketMatch,
  19.  
  20.  
  21.     ecAttrAsm, ecAttrCase, ecAttrComment, ecAttrPreProc, ecAttrPreProc2, ecAttrIdent,
  22.     ecAttrNumber, ecAttrReserved, ecAttrSpacing, ecAttrString, ecAttrOperator,
  23.  
  24.     ecCaretMark
  25.   );
  26.  
  27.   TFrameStyle = record
  28.     Color: TColor;
  29.     Style: TSynLineStyle;
  30.     Edges: TSynFrameEdges;
  31.   end;
  32.  
  33.   TStyleAndColor = record
  34.     Foreground: TColor;
  35.     Background: TColor;
  36.     Style: TFontStyles;
  37.     Frame: TFrameStyle;
  38.   end;
  39.  
  40.   TColorScheme = class(TForm)
  41.   public
  42.     SimbaSettings: TSimbaSettings;
  43.  
  44.     List: TListBox;
  45.     Splitter: TSplitter;
  46.     Editor: TSynEdit;
  47.     TopPanel, BtmPanel: TPanel;
  48.  
  49.     LabelFG, LabelBG: TLabel;
  50.     SelectFG, SelectBG: TColorBox;
  51.     CustomFGbtn, CustomBGbtn: TSpeedButton;
  52.     CustomFG, CustomBG: TColorDialog;
  53.  
  54.     CheckBold, CheckItalic, CheckUnderline: TCheckBox;
  55.  
  56.     Scheme: array [EEditorAttr] of TStyleAndColor;
  57.     DefaultScheme: array [EEditorAttr] of TStyleAndColor;
  58.  
  59.  
  60.     constructor Create(TheOwner: TComponent; TheSettings: TSimbaSettings); reintroduce;
  61.     procedure LoadDefaults();
  62.     procedure UpdateEditor();
  63.     procedure OnSelectionChange(Sender: TObject; User: Boolean);
  64.     procedure OnSelectBG(Sender: TObject);
  65.     procedure OnSelectFG(Sender: TObject);
  66.  
  67.     procedure OnBoldChange(Sender: TObject);
  68.     procedure OnItalicChange(Sender: TObject);
  69.     procedure OnUnderlineChange(Sender: TObject);
  70.   end;
  71.  
  72. implementation
  73.  
  74. uses
  75.   SynHighlighterLape, LResources, SimbaUnit;
  76.  
  77. resourcestring
  78.   ExampleText =
  79.     'program Highlight;                              '+ LineEnding +
  80.     '{comment}                                       '+ LineEnding +
  81.     '{$I SRL/osr.simba}                              '+ LineEnding +
  82.     '                                                '+ LineEnding +
  83.     '// this function does stuff                     '+ LineEnding +
  84.     'procedure Test();                               '+ LineEnding +
  85.     'var                                             '+ LineEnding +
  86.     '  x: Int32;                                     '+ LineEnding +
  87.     '  s: String;                                    '+ LineEnding +
  88.     'begin                                           '+ LineEnding +
  89.     '  x := 1000 * (5 + 7);                          '+ LineEnding +
  90.     '  s := '+#39+'The number is :'+#39+' +ToStr(x); '+ LineEnding +
  91.     '  asm                                           '+ LineEnding +
  92.     '    mov AX 1234h;                               '+ LineEnding +
  93.     '    mov Number, AX;                             '+ LineEnding +
  94.     '  end;                                          '+ LineEnding +
  95.     '                                                '+ LineEnding +
  96.     '  Inc(x);                                       '+ LineEnding +
  97.     '  {$R+}                                         '+ LineEnding +
  98.     '  case x of                                     '+ LineEnding +
  99.     '    1: ;                                        '+ LineEnding +
  100.     '    2: ;                                        '+ LineEnding +
  101.     '    3: ;                                        '+ LineEnding +
  102.     '  end;                                          '+ LineEnding +
  103.     'end;                                            ';
  104.  
  105.  
  106.  
  107. // -----------------------------------------------------------------------------
  108.  
  109. procedure TColorscheme.LoadDefaults();
  110. var i: Int32;
  111. begin
  112.   DefaultScheme[ecGutter].Background := Editor.Gutter.Color;
  113.  
  114.   DefaultScheme[ecGutterLineNumberPart].Foreground := Editor.Gutter.LineNumberPart.MarkupInfo.Foreground;
  115.   DefaultScheme[ecGutterLineNumberPart].Background := Editor.Gutter.LineNumberPart.MarkupInfo.Background;
  116.   DefaultScheme[ecGutterLineNumberPart].Style      := Editor.Gutter.LineNumberPart.MarkupInfo.Style;
  117.  
  118.   DefaultScheme[ecGutterChangesPart].Foreground := Editor.Gutter.ChangesPart.MarkupInfo.Foreground;
  119.   DefaultScheme[ecGutterChangesPart].Background := Editor.Gutter.ChangesPart.MarkupInfo.Background;
  120.   DefaultScheme[ecGutterChangesPart].Style      := Editor.Gutter.ChangesPart.MarkupInfo.Style;
  121.  
  122.   DefaultScheme[ecGutterCodeFoldPart].Foreground := Editor.Gutter.CodeFoldPart.MarkupInfo.Foreground;
  123.   DefaultScheme[ecGutterCodeFoldPart].Background := Editor.Gutter.CodeFoldPart.MarkupInfo.Background;
  124.   DefaultScheme[ecGutterCodeFoldPart].Style      := Editor.Gutter.CodeFoldPart.MarkupInfo.Style;
  125.  
  126.   DefaultScheme[ecGutterMarksPart].Foreground := Editor.Gutter.MarksPart.MarkupInfo.Foreground;
  127.   DefaultScheme[ecGutterMarksPart].Background := Editor.Gutter.MarksPart.MarkupInfo.Background;
  128.   DefaultScheme[ecGutterMarksPart].Style      := Editor.Gutter.MarksPart.MarkupInfo.Style;
  129.  
  130.   DefaultScheme[ecGutterMarksPart].Foreground := Editor.Gutter.SeparatorPart.MarkupInfo.Foreground;
  131.   DefaultScheme[ecGutterMarksPart].Background := Editor.Gutter.SeparatorPart.MarkupInfo.Background;
  132.   DefaultScheme[ecGutterMarksPart].Style      := Editor.Gutter.SeparatorPart.MarkupInfo.Style;
  133.  
  134.   // general editor
  135.   DefaultScheme[ecEdtior].Background    := Editor.Color;
  136.   DefaultScheme[ecRightEdge].Foreground := Editor.RightEdgeColor;
  137.  
  138.   DefaultScheme[ecLineHighlight].Foreground := Editor.LineHighlightColor.Foreground;
  139.   DefaultScheme[ecLineHighlight].Background := Editor.LineHighlightColor.Background;
  140.   DefaultScheme[ecLineHighlight].Style      := Editor.LineHighlightColor.Style;
  141.  
  142.   DefaultScheme[ecFoldedCode].Foreground := Editor.FoldedCodeColor.Foreground;
  143.   DefaultScheme[ecFoldedCode].Background := Editor.FoldedCodeColor.Background;
  144.   DefaultScheme[ecFoldedCode].Style      := Editor.FoldedCodeColor.Style;
  145.  
  146.   DefaultScheme[ecFoldedCodeLine].Foreground := Editor.FoldedCodeLineColor.Foreground;
  147.   DefaultScheme[ecFoldedCodeLine].Background := Editor.FoldedCodeLineColor.Background;
  148.   DefaultScheme[ecFoldedCodeLine].Style      := Editor.FoldedCodeLineColor.Style;
  149.  
  150.   DefaultScheme[ecBracketMatch].Foreground := Editor.BracketMatchColor.Foreground;
  151.   DefaultScheme[ecBracketMatch].Background := Editor.BracketMatchColor.Background;
  152.   DefaultScheme[ecBracketMatch].Style      := Editor.BracketMatchColor.Style;
  153.  
  154.   // attributes
  155.   for i:=0 to 10 do
  156.   begin
  157.     DefaultScheme[EEditorAttr(Ord(ecAttrAsm)+i)].Foreground  := Editor.Highlighter.Attribute[i].Foreground;
  158.     DefaultScheme[EEditorAttr(Ord(ecAttrAsm)+i)].Background  := Editor.Highlighter.Attribute[i].Background;
  159.     DefaultScheme[EEditorAttr(Ord(ecAttrAsm)+i)].Style       := Editor.Highlighter.Attribute[i].Style;
  160.     DefaultScheme[EEditorAttr(Ord(ecAttrAsm)+i)].Frame.Edges := Editor.Highlighter.Attribute[i].FrameEdges;
  161.     DefaultScheme[EEditorAttr(Ord(ecAttrAsm)+i)].Frame.Color := Editor.Highlighter.Attribute[i].FrameColor;
  162.     DefaultScheme[EEditorAttr(Ord(ecAttrAsm)+i)].Frame.Style := Editor.Highlighter.Attribute[i].FrameStyle;
  163.   end;
  164.  
  165.   // word match highlight
  166.   //DefaultScheme[ecCaretMark].DefaultForeground := MarkCaret.Foreground;
  167.   //DefaultScheme[ecCaretMark].DefaultBackground := MarkCaret.Background;
  168.   //DefaultScheme[ecCaretMark].DefaultStyle      := MarkCaret.Style;
  169.  
  170.   Scheme := DefaultScheme;
  171. end;
  172.  
  173. procedure TColorscheme.UpdateEditor();
  174. var i: Int32;
  175. begin
  176.   // gutter
  177.   Editor.Gutter.Color := Scheme[ecGutter].Background;
  178.  
  179.   Editor.Gutter.LineNumberPart.MarkupInfo.Foreground := Scheme[ecGutterLineNumberPart].Foreground;
  180.   Editor.Gutter.LineNumberPart.MarkupInfo.Background := Scheme[ecGutterLineNumberPart].Background;
  181.   Editor.Gutter.LineNumberPart.MarkupInfo.Style      := Scheme[ecGutterLineNumberPart].Style;
  182.  
  183.   Editor.Gutter.ChangesPart.MarkupInfo.Foreground := Scheme[ecGutterChangesPart].Foreground;
  184.   Editor.Gutter.ChangesPart.MarkupInfo.Background := Scheme[ecGutterChangesPart].Background;
  185.   Editor.Gutter.ChangesPart.MarkupInfo.Style      := Scheme[ecGutterChangesPart].Style;
  186.  
  187.   Editor.Gutter.CodeFoldPart.MarkupInfo.Foreground := Scheme[ecGutterCodeFoldPart].Foreground;
  188.   Editor.Gutter.CodeFoldPart.MarkupInfo.Background := Scheme[ecGutterCodeFoldPart].Background;
  189.   Editor.Gutter.CodeFoldPart.MarkupInfo.Style      := Scheme[ecGutterCodeFoldPart].Style;
  190.  
  191.   Editor.Gutter.MarksPart.MarkupInfo.Foreground := Scheme[ecGutterMarksPart].Foreground;
  192.   Editor.Gutter.MarksPart.MarkupInfo.Background := Scheme[ecGutterMarksPart].Background;
  193.   Editor.Gutter.MarksPart.MarkupInfo.Style      := Scheme[ecGutterMarksPart].Style;
  194.  
  195.   Editor.Gutter.SeparatorPart.MarkupInfo.Foreground := Scheme[ecGutterMarksPart].Foreground;
  196.   Editor.Gutter.SeparatorPart.MarkupInfo.Background := Scheme[ecGutterMarksPart].Background;
  197.   Editor.Gutter.SeparatorPart.MarkupInfo.Style      := Scheme[ecGutterMarksPart].Style;
  198.  
  199.   // general editor
  200.   Editor.Color := Scheme[ecEdtior].Background;
  201.   Editor.RightEdgeColor := Scheme[ecRightEdge].Foreground;
  202.  
  203.   Editor.LineHighlightColor.Foreground := Scheme[ecLineHighlight].Foreground;
  204.   Editor.LineHighlightColor.Background := Scheme[ecLineHighlight].Background;
  205.   Editor.LineHighlightColor.Style      := Scheme[ecLineHighlight].Style;
  206.  
  207.   Editor.FoldedCodeColor.Foreground := Scheme[ecFoldedCode].Foreground;
  208.   Editor.FoldedCodeColor.Background := Scheme[ecFoldedCode].Background;
  209.   Editor.FoldedCodeColor.Style      := Scheme[ecFoldedCode].Style;
  210.  
  211.   Editor.FoldedCodeLineColor.Foreground := Scheme[ecFoldedCodeLine].Foreground;
  212.   Editor.FoldedCodeLineColor.Background := Scheme[ecFoldedCodeLine].Background;
  213.   Editor.FoldedCodeLineColor.Style      := Scheme[ecFoldedCodeLine].Style;
  214.  
  215.   Editor.BracketMatchColor.Foreground := Scheme[ecBracketMatch].Foreground;
  216.   Editor.BracketMatchColor.Background := Scheme[ecBracketMatch].Background;
  217.   Editor.BracketMatchColor.Style      := Scheme[ecBracketMatch].Style;
  218.  
  219.   // attributes
  220.   for i:=0 to 10 do
  221.   begin
  222.     Editor.Highlighter.Attribute[i].Foreground := Scheme[EEditorAttr(Ord(ecAttrAsm)+i)].Foreground;
  223.     Editor.Highlighter.Attribute[i].Background := Scheme[EEditorAttr(Ord(ecAttrAsm)+i)].Background;
  224.     Editor.Highlighter.Attribute[i].Style      := Scheme[EEditorAttr(Ord(ecAttrAsm)+i)].Style;
  225.     Editor.Highlighter.Attribute[i].FrameEdges := Scheme[EEditorAttr(Ord(ecAttrAsm)+i)].Frame.Edges;
  226.     Editor.Highlighter.Attribute[i].FrameColor := Scheme[EEditorAttr(Ord(ecAttrAsm)+i)].Frame.Color;
  227.     Editor.Highlighter.Attribute[i].FrameStyle := Scheme[EEditorAttr(Ord(ecAttrAsm)+i)].Frame.Style;
  228.   end;
  229.  
  230.   // word match highlight
  231.   //MarkCaret.Foreground := Scheme[ecCaretMark].Foreground;
  232.   //MarkCaret.Background := Scheme[ecCaretMark].Background;
  233.   //MarkCaret.Style      := Scheme[ecCaretMark].Style;
  234.   //MarkCaret.FrameEdges := Scheme[ecCaretMark].Frame.Edges;
  235.   //MarkCaret.FrameColor := Scheme[ecCaretMark].Frame.Color;
  236.   //MarkCaret.FrameStyle := Scheme[ecCaretMark].Frame.Style;
  237. end;
  238.  
  239. procedure TColorscheme.OnSelectionChange(Sender: TObject; User: boolean);
  240. var
  241.   currSelection,i: Int32;
  242. begin
  243.   currSelection := List.ItemIndex;
  244.  
  245.   if (SelectFG = nil) or (SelectBG = nil) then
  246.     Exit;
  247.  
  248.   i := SelectFG.Items.IndexOfObject(TObject(PtrInt(Scheme[EEditorAttr(currSelection)].Foreground)));
  249.   if (i = -1) then
  250.   begin
  251.     SelectFG.ItemIndex := SelectFG.Items.Count-1;
  252.     SelectFG.Items.Objects[SelectFG.ItemIndex] := TObject(PtrInt(DefaultScheme[EEditorAttr(currSelection)].Foreground));
  253.   end;
  254.  
  255.   i := SelectBG.Items.IndexOfObject(TObject(PtrInt(Scheme[EEditorAttr(currSelection)].Background)));
  256.   if (i = -1) then
  257.   begin
  258.     SelectBG.ItemIndex := SelectBG.Items.Count-1;
  259.     SelectBG.Items.Objects[SelectBG.ItemIndex] := TObject(PtrInt(DefaultScheme[EEditorAttr(currSelection)].Background));
  260.   end;
  261.  
  262.   CheckBold.Checked      := fsBold      in Scheme[EEditorAttr(currSelection)].Style;
  263.   CheckItalic.Checked    := fsItalic    in Scheme[EEditorAttr(currSelection)].Style;
  264.   CheckUnderline.Checked := fsUnderline in Scheme[EEditorAttr(currSelection)].Style;
  265.  
  266.   SelectFG.Update;
  267.   SelectBG.Update;
  268. end;
  269.  
  270. procedure TColorscheme.OnSelectFG(Sender: TObject);
  271. begin
  272.   if SelectFG.ItemIndex = SelectFG.Items.Count-1 then
  273.     Scheme[EEditorAttr(List.ItemIndex)].Foreground := DefaultScheme[EEditorAttr(List.ItemIndex)].Foreground
  274.   else
  275.     Scheme[EEditorAttr(List.ItemIndex)].Foreground := SelectFG.Selected;
  276.   UpdateEditor();
  277. end;
  278.  
  279. procedure TColorscheme.OnSelectBG(Sender: TObject);
  280. begin
  281.   if SelectBG.ItemIndex = SelectBG.Items.Count-1 then
  282.     Scheme[EEditorAttr(List.ItemIndex)].Background := DefaultScheme[EEditorAttr(List.ItemIndex)].Background
  283.   else
  284.     Scheme[EEditorAttr(List.ItemIndex)].Background := SelectBG.Selected;
  285.   UpdateEditor();
  286. end;
  287.  
  288. procedure TColorscheme.OnBoldChange(Sender: TObject);
  289. begin
  290.   with Scheme[EEditorAttr(List.ItemIndex)] do
  291.     if CheckBold.Checked then Style := Style + [fsBold]
  292.     else                      Style := Style - [fsBold];
  293.   UpdateEditor();
  294. end;
  295.  
  296. procedure TColorscheme.OnItalicChange(Sender: TObject);
  297. begin
  298.   with Scheme[EEditorAttr(List.ItemIndex)] do
  299.     if CheckItalic.Checked then Style := Style + [fsItalic]
  300.     else                        Style := Style - [fsItalic];
  301.   UpdateEditor();
  302. end;
  303.  
  304. procedure TColorscheme.OnUnderlineChange(Sender: TObject);
  305. begin
  306.   with Scheme[EEditorAttr(List.ItemIndex)] do
  307.     if CheckUnderline.Checked then Style := Style + [fsUnderline]
  308.     else                           Style := Style - [fsUnderline];
  309.   UpdateEditor();
  310. end;
  311.  
  312. constructor TColorscheme.Create(TheOwner: TComponent; TheSettings: TSimbaSettings);
  313. var i: Int32;
  314. begin
  315.   inherited Create(TheOwner);
  316.  
  317.   Caption := 'Simba colors';
  318.   SimbaSettings := TheSettings;
  319.   Width  := 800;
  320.   Height := 600;
  321.   Position := poMainFormCenter;
  322.  
  323. // Top portion
  324.   TopPanel := TPanel.Create(Self);
  325.   with TopPanel do
  326.   begin
  327.     Parent := Self;
  328.     Width  := Self.Width;
  329.     Height := Round(Self.Height * 0.5);
  330.     Align  := alTop;
  331.   end;
  332.  
  333.   Editor := TSynEdit.Create(TopPanel);
  334.   with Editor do
  335.   begin
  336.     Parent := TopPanel;
  337.     Align := alRight;
  338.     Width := Round(Self.Width * 0.8);
  339.     Font.Assign(SimbaSettings.SourceEditor.Font.Value);
  340.     Highlighter := TSynFreePascalSyn.Create(Editor);
  341.     Editor.Text := ExampleText;
  342.   end;
  343.  
  344.   Splitter := TSplitter.Create(TopPanel);
  345.   with Splitter do
  346.   begin
  347.     Parent := TopPanel;
  348.     Align := alLeft;
  349.   end;
  350.  
  351.   List := TListBox.Create(TopPanel);
  352.   List.OnSelectionChange := @Self.OnSelectionChange;
  353.   with List do
  354.   begin
  355.     Parent := TopPanel;
  356.     Align := alLeft;
  357.     Width := Round(Self.Width * 0.19);
  358.  
  359.     Items.Add('Gutter');
  360.     Items.Add('   Linenumber');
  361.     Items.Add('   Changes');
  362.     Items.Add('   CodeFold');
  363.     Items.Add('   Marks');
  364.     Items.Add('   Separator');
  365.  
  366.     Items.Add('Editor');
  367.     Items.Add('   Right Edge');
  368.     Items.Add('   LineHighlight');
  369.     Items.Add('   Folded Code');
  370.     Items.Add('   Folded Code Line');
  371.     Items.Add('   Backet Match');
  372.  
  373.     Items.Add('Assembler');
  374.     Items.Add('Case label');
  375.     Items.Add('Comment');
  376.     Items.Add('Pre processor');
  377.     Items.Add('IDE directive');
  378.     Items.Add('Identifiers');
  379.     Items.Add('Numbers');
  380.     Items.Add('Reserved word');
  381.     Items.Add('Spaces');
  382.     Items.Add('Strings');
  383.     Items.Add('Operator');
  384.  
  385.     List.ItemIndex := 0;
  386.   end;
  387.  
  388. // The bottom portion:
  389.   BtmPanel := TPanel.Create(Self);
  390.   with BtmPanel do
  391.   begin
  392.     Parent := Self;
  393.     Width  := Self.Width;
  394.     align  := alBottom;
  395.     Height := Round(Self.Height * 0.5);
  396.     BevelColor:=clLtGray;
  397.     BevelWidth:=4;
  398.   end;
  399.  
  400. // Colorlists
  401.   LabelFG := TLabel.Create(BtmPanel);
  402.   LabelBG := TLabel.Create(BtmPanel);
  403.  
  404.   with LabelFG do
  405.   begin
  406.     Parent  := BtmPanel;
  407.     Caption := 'Foreground';
  408.     Left := 9;
  409.     Top  := 12;
  410.   end;
  411.  
  412.   with LabelBG do
  413.   begin
  414.     Parent  := BtmPanel;
  415.     Caption := 'Background';
  416.     Left := 9;
  417.     Top  := 40;
  418.   end;
  419.  
  420.   SelectFG := TColorBox.Create(BtmPanel);
  421.   SelectBG := TColorBox.Create(BtmPanel);
  422.  
  423.   with SelectFG do
  424.   begin
  425.     Parent   := BtmPanel;
  426.     OnChange := @Self.OnSelectFG;
  427.     Style    := [cbStandardColors,cbExtendedColors,cbSystemColors,cbCustomColor,cbPrettyNames,cbCustomColors];
  428.     Left  := 100;
  429.     Top   := 8;
  430.     Width := 150;
  431.     Items.Objects[Items.Add('Default')]   := TObject(PtrInt(-1));
  432.   end;
  433.  
  434.   with SelectBG do
  435.   begin
  436.     Parent   := BtmPanel;
  437.     OnChange := @Self.OnSelectBG;
  438.     Style    := [cbStandardColors,cbExtendedColors,cbSystemColors,cbCustomColor,cbPrettyNames,cbCustomColors];
  439.     Left  := 100;
  440.     Top   := 36;
  441.     Width := 150;
  442.     Items.Objects[Items.Add('Default')] := TObject(PtrInt(-1));
  443.   end;
  444.  
  445. // The checkboxes
  446.   CheckBold      := TCheckBox.Create(BtmPanel);
  447.   CheckItalic    := TCheckBox.Create(BtmPanel);
  448.   CheckUnderline := TCheckBox.Create(BtmPanel);
  449.  
  450.   with CheckBold do
  451.   begin
  452.     Parent := BtmPanel;
  453.     Left   := 300;
  454.     Top    := 8;
  455.     Caption:= 'Bold';
  456.     CheckBold.OnChange := @Self.OnBoldChange;
  457.   end;
  458.  
  459.   with CheckItalic do
  460.   begin
  461.     Parent := BtmPanel;
  462.     Left   := 300;
  463.     Top    := 36;
  464.     Caption:= 'Italic';
  465.     CheckItalic.OnChange := @Self.OnItalicChange;
  466.   end;
  467.  
  468.   with CheckUnderline do
  469.   begin
  470.     Parent := BtmPanel;
  471.     Left   := 300;
  472.     Top    := 64;
  473.     Caption:= 'Underline';
  474.     CheckUnderline.OnChange := @Self.OnUnderlineChange;
  475.   end;
  476.  
  477.  
  478.   LoadDefaults();
  479. end;
  480.  
  481.  
  482. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement