added TWinControl.ParentFormInitializeWnd

git-svn-id: trunk@5288 -
This commit is contained in:
mattias 2004-03-08 22:36:01 +00:00
parent db521415c7
commit fc72bfb144
7 changed files with 44 additions and 7 deletions

View File

@ -1344,6 +1344,7 @@ type
function CreateWindowHandle(const AParams: TCreateParams): THandle; virtual;
procedure CreateWnd; virtual; //creates the window
procedure InitializeWnd; virtual; //gets called after the window is created
procedure ParentFormInitializeWnd; virtual; //gets called by InitializeWnd of parent form
function ParentHandlesAllocated: boolean; override;
procedure Loaded; override;
procedure DestroyWnd; virtual;
@ -2233,6 +2234,9 @@ end.
{ =============================================================================
$Log$
Revision 1.188 2004/03/08 22:36:01 mattias
added TWinControl.ParentFormInitializeWnd
Revision 1.187 2004/03/07 09:37:20 mattias
added workaround for AutoSize in TCustomLabel

View File

@ -404,6 +404,7 @@ type
procedure EndFormUpdate;
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
procedure Loaded; override;
procedure InitializeWnd; override;
// Delphi needs GetClientRect for win32 specific things, LCL not
// Function GetClientRect : TRect ; Override;
procedure Notification(AComponent: TComponent; Operation : TOperation);override;

View File

@ -48,9 +48,6 @@ end;
starts immediately.
------------------------------------------------------------------------------}
procedure TControl.BeginDrag(Immediate: Boolean; Threshold: Integer);
var
P : TPoint;
begin
@ -2887,6 +2884,9 @@ end;
{ =============================================================================
$Log$
Revision 1.177 2004/03/08 22:36:01 mattias
added TWinControl.ParentFormInitializeWnd
Revision 1.176 2004/03/07 09:37:20 mattias
added workaround for AutoSize in TCustomLabel

View File

@ -1431,6 +1431,13 @@ begin
Visible:=true;
end;
procedure TCustomForm.InitializeWnd;
begin
inherited InitializeWnd;
if Parent<>nil then
ParentFormInitializeWnd;
end;
{------------------------------------------------------------------------------
procedure TCustomForm.BeginFormUpdate;
------------------------------------------------------------------------------}
@ -1592,6 +1599,9 @@ end;
{ =============================================================================
$Log$
Revision 1.131 2004/03/08 22:36:01 mattias
added TWinControl.ParentFormInitializeWnd
Revision 1.130 2004/03/06 14:39:50 micha
although loading, attach menu to form if handle already created, if this is not wanted, then prevent creation of handle somehow
fixes bug #197

View File

@ -97,9 +97,12 @@ begin
end;
end;
procedure TCustomLabel.InitializeWnd;
{------------------------------------------------------------------------------
procedure TCustomLabel.ParentFormInitializeWnd;
------------------------------------------------------------------------------}
procedure TCustomLabel.ParentFormInitializeWnd;
begin
inherited InitializeWnd;
inherited ParentFormInitializeWnd;
// workaround, till AutoSizing is completed in TWinControl
DoAutoSize;
end;
@ -182,6 +185,9 @@ end;
{ =============================================================================
$Log$
Revision 1.13 2004/03/08 22:36:01 mattias
added TWinControl.ParentFormInitializeWnd
Revision 1.12 2004/03/07 09:37:20 mattias
added workaround for AutoSize in TCustomLabel

View File

@ -3061,7 +3061,7 @@ end;
Params: none
Returns: Nothing
Gets called after the window is created, but before the owned controls are
Gets called after the window is created, but before the child controls are
created. Place cached property code here.
------------------------------------------------------------------------------}
procedure TWinControl.InitializeWnd;
@ -3097,6 +3097,16 @@ begin
Resize;
end;
procedure TWinControl.ParentFormInitializeWnd;
var
i: Integer;
begin
if FWinControls <> nil then begin
for i := 0 to FWinControls.Count - 1 do
TWinControl(FWinControls.Items[i]).ParentFormInitializeWnd;
end;
end;
function TWinControl.ParentHandlesAllocated: boolean;
var
CurControl: TWinControl;
@ -3447,6 +3457,9 @@ end;
{ =============================================================================
$Log$
Revision 1.212 2004/03/08 22:36:01 mattias
added TWinControl.ParentFormInitializeWnd
Revision 1.211 2004/03/07 09:37:20 mattias
added workaround for AutoSize in TCustomLabel

View File

@ -660,7 +660,7 @@ type
protected
function GetLabelText: String ; virtual;
procedure DoAutoSize; Override;
procedure InitializeWnd; override;
procedure ParentFormInitializeWnd; override;
procedure Notification(AComponent : TComponent; Operation : TOperation); override;
procedure SetFocusControl(Val : TWinControl); virtual;
procedure SetShowAccelChar(Val : boolean); virtual;
@ -1520,6 +1520,9 @@ end.
{ =============================================================================
$Log$
Revision 1.138 2004/03/08 22:36:01 mattias
added TWinControl.ParentFormInitializeWnd
Revision 1.137 2004/03/08 00:48:05 mattias
moved TOnwerDrawState to StdCtrls