diff options
author | Jean-Marc.Levecque <jmarc.levecque@bbox.fr> | 2014-12-06 15:25:37 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2014-12-06 15:25:37 +0000 |
commit | a48cf325aedffd6eb0a28e9c1df6ff31c56fd796 (patch) | |
tree | 6f3f921d0a77824b895fa965b88a57e1f277f827 | |
parent | 58cad7e7d50a430b47b1e6da98c610f2a58e4fd5 (diff) | |
download | fpGUI-a48cf325aedffd6eb0a28e9c1df6ff31c56fd796.tar.xz |
Allow grids scrollbarpage setting
-rw-r--r-- | src/gui/fpg_basegrid.pas | 15 | ||||
-rw-r--r-- | src/gui/fpg_grid.pas | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/fpg_basegrid.pas b/src/gui/fpg_basegrid.pas index 314cdc68..ce5665df 100644 --- a/src/gui/fpg_basegrid.pas +++ b/src/gui/fpg_basegrid.pas @@ -99,6 +99,8 @@ type procedure SetHeaderStyle(const AValue: TfpgGridHeaderStyle); procedure SetRowSelect(const AValue: boolean); procedure SetScrollBarStyle(const AValue: TfpgScrollStyle); + function GetScrollBarPage: integer; + procedure SetScrollBarPage(const AValue: integer); procedure VScrollBarMove(Sender: TObject; position: integer); procedure SetDefaultColWidth(const AValue: integer); procedure SetDefaultRowHeight(const AValue: integer); @@ -163,6 +165,7 @@ type property ShowGrid: boolean read FShowGrid write SetShowGrid default True; property AutoHeight: boolean read FAutoHeight write SetAutoHeight default False; property ScrollBarStyle: TfpgScrollStyle read FScrollBarStyle write SetScrollBarStyle default ssAutoBoth; + property ScrollBarPage: Integer read GetScrollBarPage write SetScrollBarPage; property HeaderHeight: integer read FHeaderHeight write SetHeaderHeight; property TotalColumnWidth: integer read GetTotalColumnWidth; // property ColResizing: boolean read FColResizing write FColResizing; @@ -312,6 +315,18 @@ begin FScrollBarStyle := AValue; end; +function TfpgBaseGrid.GetScrollBarPage: integer; +begin + Result:= FVScrollBar.PageSize; +end; + +procedure TfpgBaseGrid.SetScrollBarPage(const AValue: integer); +begin + if AValue= FVScrollBar.PageSize then + Exit; //==> + FVScrollBar.PageSize:= AValue; +end; + procedure TfpgBaseGrid.VScrollBarMove(Sender: TObject; position: integer); begin if FFirstRow <> position then diff --git a/src/gui/fpg_grid.pas b/src/gui/fpg_grid.pas index 86ffb555..12257f56 100644 --- a/src/gui/fpg_grid.pas +++ b/src/gui/fpg_grid.pas @@ -159,6 +159,7 @@ type property RowCount; property RowSelect; property ScrollBarStyle; + property ScrollBarPage; property ShowGrid; property ShowHeader; property ShowHint; |