diff options
-rw-r--r-- | src/corelib/fpg_widget.pas | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/fpg_widget.pas b/src/corelib/fpg_widget.pas index fe19a4e3..322a6217 100644 --- a/src/corelib/fpg_widget.pas +++ b/src/corelib/fpg_widget.pas @@ -405,6 +405,8 @@ begin FBackgroundColor := clWindowBackground; FTextColor := clText1; + inherited Create(AOwner); + if (AOwner <> nil) and (AOwner is TfpgWidget) then begin Parent := TfpgWidget(AOwner); @@ -419,8 +421,6 @@ begin FShowHint := Parent.ShowHint; end; - inherited Create(AOwner); - // This is for components that are created at runtime, after it's // parent has already been shown. if (Parent <> nil) and (Parent.HasHandle) then @@ -718,9 +718,8 @@ end; procedure TfpgWidget.InternalHandleShow; begin FOnScreen := True; - FVisible := False; AllocateWindowHandle; - DoSetWindowVisible(False); + DoSetWindowVisible(FVisible); end; procedure TfpgWidget.HandleHide; |