Recent

Author Topic: Synedit Colors...  (Read 5081 times)

mmab

  • Jr. Member
  • **
  • Posts: 89
Synedit Colors...
« on: May 17, 2010, 09:11:48 pm »
 
Hi,
I tried to change the folding color frame color (usually red framed), and the changed code color (which is usually yellow) of the pascal highlighter. But couldn't do it.

the attributes of the highlighter doesn't have this option
Code: [Select]
for i := 0 to synedit1.Highlighter.AttrCount - 1 do
begin
     memo1.Lines.Add(format('%d-%d-%d-%d',[i,synedit1.Highlighter.Attribute[i].Background,synedit1.Highlighter.Attribute[i].Foreground,synedit1.Highlighter.Attribute[i].FrameColor]));
end;





Any ideas?
thanks

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11164
  • Debugger - SynEdit - and more
    • wiki
Re: Synedit Colors...
« Reply #1 on: May 25, 2010, 03:08:41 pm »
It's not part of the highlighter.

Code: [Select]
with SynEdit1.FoldedCodeColor do begin
  Background :=
  Foreground :=
  FrameColor :=

mmab

  • Jr. Member
  • **
  • Posts: 89
Re: Synedit Colors...
« Reply #2 on: May 26, 2010, 05:57:17 pm »
Thank you Martin.
I've found it before your posting. The folded color is OK.
But how about the red frame color which appears whenever you click on one of the keywords such as " for .... end" or "if   ... end"?
I guess it's not a part of synedit.

Thanks..





Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11164
  • Debugger - SynEdit - and more
    • wiki
Re: Synedit Colors...
« Reply #3 on: May 26, 2010, 06:17:51 pm »
it's a bt more complex

    property MarkupByClass[Index: TSynEditMarkupClass]: TSynEditMarkup
      read GetMarkupByClass;


without testing (it should always be assigned)

Code: [Select]
if assigned(synEdit1.MarkupByClass[TSynEditMarkupWordGroup]) then
  TSynEditMarkupWordGroup(synEdit1.MarkupByClass[TSynEditMarkupWordGroup]).MarkupInfo.FrameColor :=



you don't actually need the typecast in this case

 

TinyPortal © 2005-2018