From a48cf325aedffd6eb0a28e9c1df6ff31c56fd796 Mon Sep 17 00:00:00 2001 From: "Jean-Marc.Levecque" Date: Sat, 6 Dec 2014 15:25:37 +0000 Subject: Allow grids scrollbarpage setting --- src/gui/fpg_basegrid.pas | 15 +++++++++++++++ src/gui/fpg_grid.pas | 1 + 2 files changed, 16 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2