diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_basegrid.pas | 5 | ||||
-rw-r--r-- | src/gui/fpg_customgrid.pas | 21 |
2 files changed, 11 insertions, 15 deletions
diff --git a/src/gui/fpg_basegrid.pas b/src/gui/fpg_basegrid.pas index 6a1fd8b0..c67f7b9d 100644 --- a/src/gui/fpg_basegrid.pas +++ b/src/gui/fpg_basegrid.pas @@ -1153,8 +1153,6 @@ procedure TfpgBaseGrid.Update; begin if csUpdating in ComponentState then Exit; - -// UpdateScrollBars; FollowFocus; RePaint; end; @@ -1173,7 +1171,8 @@ begin if FUpdateCount = 0 then begin Updated; - RePaint; +// RePaint; + Update; end; end; end; diff --git a/src/gui/fpg_customgrid.pas b/src/gui/fpg_customgrid.pas index ed3b3a89..b0c2d3ab 100644 --- a/src/gui/fpg_customgrid.pas +++ b/src/gui/fpg_customgrid.pas @@ -217,18 +217,15 @@ procedure TfpgCustomGrid.SetRowCount(const AValue: Integer); begin if FRowCount = AValue then Exit; //==> - FRowCount := AValue; - if FocusRow > FRowCount-1 then - FocusRow := FRowCount-1; - DoSetRowCount(AValue); // could be implemented by descendants - - // graemeg 2008-07-18: I believe after all the repaint and event fixes - // this check is not required anymore. - //if csUpdating in ComponentState then - //Exit; - Update; -// UpdateScrollBars; -// RePaint; + BeginUpdate; + try + FRowCount := AValue; + if FocusRow > FRowCount-1 then + FocusRow := FRowCount-1; + DoSetRowCount(AValue); // could be implemented by descendants + finally + EndUpdate; + end; end; function TfpgCustomGrid.GetColumnWidth(ACol: Integer): integer; |