Add option to set SynMemoQuery.ActiveLineColor . By default, this color is set to clWindow (same as the memo itself has). Reverts rev 949 where ActiveLineColor was hardcoded.

This commit is contained in:
Ansgar Becker
2007-10-06 11:58:14 +00:00
parent 531a32e69a
commit 5831c331a4
4 changed files with 29 additions and 1 deletions

View File

@@ -1140,7 +1140,7 @@ object MDIChild: TMDIChild
Height = 96
SingleLineMode = False
Align = alClient
ActiveLineColor = 8454143
ActiveLineColor = clWindow
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13

View File

@@ -1011,6 +1011,8 @@ begin
SynSQLSyn1.CommentAttri.Foreground := StringToColor( reg.ReadString( 'SQLColCommentAttri' ) );
if reg.ValueExists( 'SQLColTablenameAttri' ) then
SynSQLSyn1.TablenameAttri.Foreground := StringToColor( reg.ReadString( 'SQLColTablenameAttri' ) );
if reg.ValueExists( 'SQLColActiveLine' ) then
SynMemoQuery.ActiveLineColor := StringToColor( reg.ReadString('SQLColActiveLine') );
// SQLFiles-History
FillPopupQueryLoad();

View File

@@ -250,6 +250,13 @@ object optionsform: Toptionsform
Height = 13
Caption = 'Table-Names:'
end
object Label29: TLabel
Left = 16
Top = 169
Width = 112
Height = 13
Caption = 'Active line background:'
end
object pnlKeywords: TPanel
Left = 104
Top = 25
@@ -327,6 +334,17 @@ object optionsform: Toptionsform
TabOrder = 6
OnClick = CallColorDialog
end
object pnlActiveLine: TPanel
Left = 156
Top = 165
Width = 25
Height = 25
Cursor = crHandPoint
BevelOuter = bvLowered
ParentBackground = False
TabOrder = 7
OnClick = CallColorDialog
end
end
end
end

View File

@@ -88,6 +88,8 @@ type
chkRememberFilters: TCheckBox;
chkLogToFile: TCheckBox;
btnOpenLogFolder: TButton;
Label29: TLabel;
pnlActiveLine: TPanel;
procedure ButtonCancelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Modified(Sender: TObject);
@@ -172,6 +174,7 @@ begin
reg.WriteString('SQLColStringAttri', colortostring(pnlString.Color));
reg.WriteString('SQLColCommentAttri', colortostring(pnlComments.Color));
reg.WriteString('SQLColTablenameAttri', colortostring(pnlTablenames.Color));
reg.WriteString('SQLColActiveLine', ColorToString(pnlActiveLine.Color));
reg.WriteString('CSVSeparator', Edit1.Text);
reg.WriteString('CSVEncloser', Edit2.Text);
reg.WriteString('CSVTerminator', Edit3.Text);
@@ -201,6 +204,7 @@ begin
cwin.SynSQLSyn1.StringAttri.Foreground := self.pnlString.Color;
cwin.SynSQLSyn1.CommentAttri.Foreground := self.pnlComments.Color;
cwin.SynSQLSyn1.TablenameAttri.Foreground := self.pnlTablenames.Color;
cwin.SynMemoQuery.ActiveLineColor := self.pnlActiveLine.Color;
while cwin.SynMemoSQLLog.Lines.Count > updownLogSQLNum.Position do
cwin.SynMemoSQLLog.Lines.Delete(0);
cwin.gridData.Font := self.Panel8.font;
@@ -318,6 +322,10 @@ begin
pnlTablenames.Color := StringToColor(reg.readstring('SQLColTablenameAttri'))
else
pnlTablenames.Color := clFuchsia;
if reg.ValueExists('SQLColActiveLine') then
pnlActiveLine.Color := StringToColor(reg.readstring('SQLColActiveLine'))
else
pnlActiveLine.Color := clWindow;
Edit1.Text := ',';