From 495ced5bae187c48fa80edf0eef6a4b1c604da01 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 10 Oct 2023 06:42:52 +0200 Subject: [PATCH] Issue #861: same style for row id column in grid and table editor --- source/main.pas | 4 ++-- source/table_editor.pas | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/main.pas b/source/main.pas index aa6dfaa7..049435f9 100644 --- a/source/main.pas +++ b/source/main.pas @@ -3359,7 +3359,7 @@ begin col := NewTab.Grid.Header.Columns.Add; col.CaptionAlignment := taRightJustify; col.Alignment := taRightJustify; - col.Options := col.Options + [coFixed]- [coAllowClick, coAllowFocus]; + col.Options := col.Options + [coFixed]- [coAllowClick, coAllowFocus, coEditable, coResizable]; col.Text := '#'; for i:=0 to NewTab.Results.ColumnCount-1 do begin col := NewTab.Grid.Header.Columns.Add; @@ -6030,7 +6030,7 @@ begin Col := vt.Header.Columns.Add; Col.CaptionAlignment := taRightJustify; Col.Alignment := taRightJustify; - Col.Options := col.Options + [coFixed]- [coAllowClick, coAllowFocus]; + Col.Options := col.Options + [coFixed]- [coAllowClick, coAllowFocus, coEditable, coResizable]; Col.Text := '#'; for i:=0 to WantedColumns.Count-1 do begin InitColumn(i, WantedColumns[i]); diff --git a/source/table_editor.pas b/source/table_editor.pas index 440d30d0..3777656f 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -1354,13 +1354,14 @@ begin end; // No specific colors for selected nodes, would interfere with blue selection background - if vsSelected in Node.States then Exit; - // Break early if nothing to do - if not (Column in [2, 7]) then Exit; + // Disabled in Oct 2023, probably works better than expected + //if vsSelected in Node.States then Exit; // Give datatype column specific color, as set in preferences TextColor := TargetCanvas.Font.Color; case Column of + 0: TextColor := clGrayText; + 2: TextColor := DatatypeCategories[Col.DataType.Category].Color; 7: case Col.DefaultType of