diff options
Diffstat (limited to 'src/gui/fpg_scrollframe.pas')
-rw-r--r-- | src/gui/fpg_scrollframe.pas | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/fpg_scrollframe.pas b/src/gui/fpg_scrollframe.pas index 8e5bc769..fd467c46 100644 --- a/src/gui/fpg_scrollframe.pas +++ b/src/gui/fpg_scrollframe.pas @@ -39,6 +39,7 @@ type FMarginBR : integer; procedure SetMarginBR (AValue: integer); public + procedure AfterConstruction; override; procedure AdjustDimsFor (w : TfpgWidget; updatewp: boolean = true); procedure AdjustDimsWithout (w : TfpgWidget); procedure RecalcFrameSize; @@ -107,6 +108,12 @@ begin RecalcFrameSize; end; +procedure TfpgAutoSizingFrame.AfterConstruction; +begin + inherited AfterConstruction; + RecalcFrameSize; +end; + procedure TfpgAutoSizingFrame.AdjustDimsFor (w: TfpgWidget; updatewp: boolean = true); var new_w, new_h: integer; @@ -429,11 +436,11 @@ begin inherited Create(AOwner); FVisibleArea := TfpgEmbeddingFrame.Create(self); - FVisibleArea.SetPosition(0, 0, 1, 1); + FVisibleArea.HandleMove(0, 0); FVisibleArea.ParentScrollFrame := self; FContentFrame := TfpgAutoSizingFrame.Create(FVisibleArea); - FContentFrame.SetPosition(0, 0, 1, 1); + FContentFrame.HandleMove(0, 0); FContentFrame.ParentScrollFrame := self; end; @@ -442,11 +449,11 @@ begin inherited Create(AOwner); FVisibleArea := TfpgEmbeddingFrame.Create(self); - FVisibleArea.SetPosition(0, 0, 1, 1); + FVisibleArea.HandleMove(0, 0); FVisibleArea.ParentScrollFrame := self; FContentFrame := ContentFrameType.Create(FVisibleArea); - FContentFrame.SetPosition(0, 0, 1, 1); + FContentFrame.HandleMove(0, 0); FContentFrame.ParentScrollFrame := self; end; |