diff options
author | Jean-Marc <jmarc.levecque@dbmail.com> | 2014-07-23 06:41:55 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2014-07-25 00:45:38 +0100 |
commit | 8477c23aa2e9633c2b4de36461405f3c4c45fa43 (patch) | |
tree | f3f9844cb6bea0faa36ffb54d0ca032886cb01a8 /src/gui | |
parent | ef36881be7ee72d09d99ee1df2759cf4f969cd7e (diff) | |
download | fpGUI-8477c23aa2e9633c2b4de36461405f3c4c45fa43.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 |