From f9b6fdaf64fcfa3c97e54e74f13bd7b7a86808c2 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 12 Feb 2008 19:49:32 +0000 Subject: [PATCH] Follow up to rev 1156: Enhance readability of selected NULL cells with grey font color: Just use the default font color clWindowText in those cases. User report: http://www.heidisql.com/forum/viewtopic.php?p=1753 Code inspired by: http://qc.codegear.com/wc/qcmain.aspx?d=3009 --- source/childwin.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/childwin.pas b/source/childwin.pas index cbc6e0ad..90354756 100644 --- a/source/childwin.pas +++ b/source/childwin.pas @@ -4863,7 +4863,10 @@ begin Grid := Sender as TTntDBGrid; if (Grid.Fields[DataCol] <> nil) and Grid.Fields[DataCol].IsNull then begin - Grid.Canvas.Font.Color := COLOR_NULLVALUE; + if (Grid.SelectedRows.IndexOf(Grid.DataSource.DataSet.Bookmark) <> -1) or (gdSelected in State) then + Grid.Canvas.Font.Color := clWindowText + else + Grid.Canvas.Font.Color := COLOR_NULLVALUE; // Just use the changed font color for (MEMO) and (BLOB) cells if Grid.Fields[DataCol].DataType in [ftMemo, ftBlob] then Grid.DefaultDrawColumnCell(Rect, DataCol, Grid.Columns[DataCol], State)