diff options
author | Andrew Haines <andrewd207@aol.com> | 2015-02-01 23:17:27 -0500 |
---|---|---|
committer | Andrew Haines <andrewd207@aol.com> | 2015-02-01 23:17:27 -0500 |
commit | d351655a167dc6afe70ed659561ef8b3a4019305 (patch) | |
tree | 3843e8f137929b13a74ba787ec6f9f5541fc2427 /src/gui/fpg_customgrid.pas | |
parent | c7fc66e330b4665843e195436e7e5095de5dbdfc (diff) | |
parent | 0955cc8f881782e1565447f04a0afb774e1237aa (diff) | |
download | fpGUI-d351655a167dc6afe70ed659561ef8b3a4019305.tar.xz |
Merge branch 'develop' of https://github.com/graemeg/fpGUI into develop
Fixed xml conflicts of lpi's manually
Conflicts:
examples/gui/filedialog/filedialog.lpi
examples/gui/modalforms/modalforms.lpi
Diffstat (limited to 'src/gui/fpg_customgrid.pas')
-rw-r--r-- | src/gui/fpg_customgrid.pas | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/fpg_customgrid.pas b/src/gui/fpg_customgrid.pas index 83d35aa7..923bed91 100644 --- a/src/gui/fpg_customgrid.pas +++ b/src/gui/fpg_customgrid.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -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 |