diff options
author | Jean-Marc <jmarc.levecque@dbmail.com> | 2014-07-23 06:41:55 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2014-07-23 06:41:55 +0100 |
commit | 3bdd7fcce7e6aa033c98ff3dba824536d9ca6456 (patch) | |
tree | b45cb599079a4a3fb6eae96f71df3ab2cc13cf72 /src/gui | |
parent | 1f865fb18d84e751662ce098b8dc2413de5105c3 (diff) | |
download | fpGUI-3bdd7fcce7e6aa033c98ff3dba824536d9ca6456.tar.xz |
Set actual grid background color
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_customgrid.pas | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/fpg_customgrid.pas b/src/gui/fpg_customgrid.pas index 83d35aa7..98040374 100644 --- a/src/gui/fpg_customgrid.pas +++ b/src/gui/fpg_customgrid.pas @@ -65,6 +65,7 @@ type FColumns: TFPList; procedure HandleSetFocus; override; procedure SetTextColor(const AValue: TfpgColor); override; + procedure SetBackgroundColor(const AValue: TfpgColor); override; function GetColumns(AIndex: integer): TfpgGridColumn; virtual; procedure DoDeleteColumn(ACol: integer); virtual; procedure DoSetRowCount(AValue: integer); virtual; @@ -140,6 +141,18 @@ begin Update; end; +procedure TfpgCustomGrid.SetBackgroundColor(const AValue: TfpgColor); +var + i: integer; +begin + inherited SetBackgroundColor(AValue); + for i := 0 to ColumnCount-1 do + begin + TfpgGridColumn(FColumns.Items[i]).BackgroundColor := AValue; + end; + RePaint; +end; + function TfpgCustomGrid.GetColumns(AIndex: integer): TfpgGridColumn; begin if (AIndex < 0) or (AIndex > FColumns.Count-1) then |