summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-06-12 14:40:49 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-06-12 14:40:49 +0000
commitaf854e41c0f98acec4be31efe1d6690cefa60554 (patch)
tree4f62cc6702eabc20c0cb9a3f1f582fc7068511a1 /src/gui
parent6b227a12b5233ec4bac8f74e8cce64e49b5858ff (diff)
downloadfpGUI-af854e41c0f98acec4be31efe1d6690cefa60554.tar.xz
* Minor fixes to csUpdating ComponentState in Grids.
* fpgApplication now closes all forms created via fpgApplication.CreateForm() before the main form when the application terminates. * Minor documentation update for fpgfx.pas unit.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_basegrid.pas5
-rw-r--r--src/gui/gui_customgrid.pas2
-rw-r--r--src/gui/gui_grid.pas4
3 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/gui_basegrid.pas b/src/gui/gui_basegrid.pas
index 4f2382f3..a2ca441c 100644
--- a/src/gui/gui_basegrid.pas
+++ b/src/gui/gui_basegrid.pas
@@ -95,6 +95,7 @@ type
function VisibleHeight: integer;
procedure SetFirstRow(const AValue: Integer);
protected
+ property UpdateCount: integer read FUpdateCount;
procedure UpdateScrollBars; virtual;
function GetHeaderText(ACol: Integer): string; virtual;
function GetColumnWidth(ACol: Integer): integer; virtual;
@@ -1148,6 +1149,7 @@ end;
procedure TfpgBaseGrid.BeginUpdate;
begin
Inc(FUpdateCount);
+ Updating;
end;
procedure TfpgBaseGrid.EndUpdate;
@@ -1156,7 +1158,10 @@ begin
begin
Dec(FUpdateCount);
if FUpdateCount = 0 then
+ begin
+ Updated;
RePaint;
+ end;
end;
end;
diff --git a/src/gui/gui_customgrid.pas b/src/gui/gui_customgrid.pas
index 1ed59e6f..dc2c0631 100644
--- a/src/gui/gui_customgrid.pas
+++ b/src/gui/gui_customgrid.pas
@@ -298,7 +298,7 @@ begin
Result.Backgroundcolor := clBoxcolor;
Result.TextColor := TextColor;
FColumns.Add(Result);
-
+
if csUpdating in ComponentState then
Exit; //==>
diff --git a/src/gui/gui_grid.pas b/src/gui/gui_grid.pas
index eaeb9ddc..2284bec1 100644
--- a/src/gui/gui_grid.pas
+++ b/src/gui/gui_grid.pas
@@ -469,7 +469,9 @@ begin
for r := 0 to RowCount-1 do
Result.Cells.Append('');
- Updated;
+
+ if UpdateCount = 0 then
+ Updated; // if we called .BeginUpdate then don't clear csUpdating here
end;
end.