summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-05 11:11:16 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-05 11:11:16 +0000
commita461d3206b5625fb7a45cafa218495ea59868927 (patch)
treeee965fa3278efcbf3d4605a47a9fabea3aaf89c8 /src
parent50dff4b82733d267e0b5b7dba5b35d0036b5c333 (diff)
downloadfpGUI-a461d3206b5625fb7a45cafa218495ea59868927.tar.xz
* Fixed the Grid creation and setup. It caused issues in the UI Designer under Windows.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui_basegrid.pas8
-rw-r--r--src/gui/gui_customgrid.pas9
-rw-r--r--src/gui/gui_trackbar.pas3
3 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/gui_basegrid.pas b/src/gui/gui_basegrid.pas
index 68f31f96..e2049481 100644
--- a/src/gui/gui_basegrid.pas
+++ b/src/gui/gui_basegrid.pas
@@ -146,6 +146,7 @@ type
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
+ procedure AfterConstruction; override;
procedure Update;
procedure BeginUpdate;
procedure EndUpdate;
@@ -1080,6 +1081,7 @@ end;
constructor TfpgBaseGrid.Create(AOwner: TComponent);
begin
+ Updating;
inherited Create(AOwner);
Focusable := True;
Width := 120;
@@ -1131,6 +1133,12 @@ begin
inherited Destroy;
end;
+procedure TfpgBaseGrid.AfterConstruction;
+begin
+ inherited AfterConstruction;
+ Updated;
+end;
+
procedure TfpgBaseGrid.Update;
begin
UpdateScrollBars;
diff --git a/src/gui/gui_customgrid.pas b/src/gui/gui_customgrid.pas
index 3f0af996..53123cec 100644
--- a/src/gui/gui_customgrid.pas
+++ b/src/gui/gui_customgrid.pas
@@ -177,6 +177,9 @@ begin
dec(n);
end;
end;
+
+ if csUpdating in ComponentState then
+ Exit;
UpdateScrollBars;
RePaint;
end;
@@ -191,6 +194,8 @@ begin
FocusRow := FRowCount;
end;
DoSetRowCount(AValue); // could be implemented by descendants
+ if csUpdating in ComponentState then
+ Exit;
UpdateScrollBars;
RePaint;
end;
@@ -273,8 +278,8 @@ constructor TfpgCustomGrid.Create(AOwner: TComponent);
begin
FColumns := TList.Create;
inherited Create(AOwner);
- ColumnCount := 5;
- RowCount := 5;
+ ColumnCount := 0;
+ RowCount := 0;
end;
destructor TfpgCustomGrid.Destroy;
diff --git a/src/gui/gui_trackbar.pas b/src/gui/gui_trackbar.pas
index b067f99f..fdb7697d 100644
--- a/src/gui/gui_trackbar.pas
+++ b/src/gui/gui_trackbar.pas
@@ -378,6 +378,7 @@ begin
FMax := AValue;
if FPosition > FMax then
SetTBPosition(FMax);
+ Repaint;
end;
procedure TfpgTrackBar.SetMin(const AValue: integer);
@@ -390,6 +391,7 @@ begin
FMin := AValue;
if FPosition < FMin then
SetTBPosition(FMin);
+ Repaint;
end;
procedure TfpgTrackBar.SetTBPosition(const AValue: integer);
@@ -403,6 +405,7 @@ begin
if HasHandle then
DrawSlider(False);
+ Repaint;
end;
procedure TfpgTrackBar.SetShowPosition(const AValue: boolean);