diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-07 14:56:47 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-07 14:56:47 +0000 |
commit | 1e7af73a67cff669d2b5801f5097e71b30673adc (patch) | |
tree | 1a8a9dc39e475c9e4c429f8d7ef59c729dc44f5d /src/corelib | |
parent | c05c7618ddfcf94117efaae8c83dfa2738f5d0a3 (diff) | |
download | fpGUI-1e7af73a67cff669d2b5801f5097e71b30673adc.tar.xz |
GFX: Added support for handle component creation at runtime correct
while the parent component is already visible.
* GUI: Introduced the usage of ComponentState so that the components react correctly in the
GUI Designer. Not all components are tested yet.
* GUI Designer almost paints the designed form correctly. When placing a component, they are
invisible, but as soon as you resize them, they are painted correctly. This is still work
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/gfx_widget.pas | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas index c777c496..7637deb7 100644 --- a/src/corelib/gfx_widget.pas +++ b/src/corelib/gfx_widget.pas @@ -190,6 +190,7 @@ end; constructor TfpgWidget.Create(AOwner: TComponent); begin + Include(ComponentState, csLoading); FOnScreen := False; FVisible := True; FActiveWidget := nil; @@ -211,6 +212,13 @@ begin FWindowType := wtChild; inherited; + + // This is for components that are create at runtime, after it's + // parent has already been shown. + if (Parent <> nil) and (Parent.HasHandle) then + HandleShow; + + Exclude(ComponentState, csLoading); end; destructor TfpgWidget.Destroy; |