mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
MG: TForm.Position will now considered before creating form on 0,0
git-svn-id: trunk@1525 -
This commit is contained in:
parent
0bf1e61fad
commit
3d7960e165
@ -26,7 +26,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, Controls, Forms, Buttons, SysUtils, StdCtrls, ExtCtrls,
|
||||
LCLLinux{must be defined before graphics}, Graphics;
|
||||
LCLLinux{must be used before graphics}, Graphics;
|
||||
|
||||
type
|
||||
TSplashForm = class(TForm)
|
||||
@ -328,6 +328,7 @@ begin
|
||||
OnTimer := @HideFormTimer;
|
||||
Enabled := False;
|
||||
end;
|
||||
Paint;
|
||||
end;
|
||||
|
||||
destructor TSplashForm.Destroy;
|
||||
@ -376,6 +377,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.8 2002/03/18 11:44:41 lazarus
|
||||
MG: TForm.Position will now considered before creating form on 0,0
|
||||
|
||||
Revision 1.7 2001/11/19 21:48:53 lazarus
|
||||
MG: fixed splash timer AV, incomplete project loading, application save as
|
||||
|
||||
|
@ -127,10 +127,11 @@ type
|
||||
Procedure Notification(AComponent: TComponent; Operation : TOperation);override;
|
||||
procedure Paint; dynamic;
|
||||
Procedure PaintWindow(dc : Hdc); override;
|
||||
Procedure RequestAlign; Override;
|
||||
Procedure RequestAlign; override;
|
||||
procedure UpdateShowing; override;
|
||||
procedure UpdateWindowState;
|
||||
procedure ValidateRename(AComponent: TComponent; const CurName, NewName: string);override;
|
||||
procedure ValidateRename(AComponent: TComponent;
|
||||
const CurName, NewName: string);override;
|
||||
procedure WndProc(var Message : TLMessage); override;
|
||||
{events}
|
||||
property ActiveControl : TWinControl read FActiveControl write SetActiveControl;
|
||||
@ -138,7 +139,8 @@ type
|
||||
property FormStyle : TFormStyle read FFormStyle write SetFormStyle default fsNormal;
|
||||
property OnActivate: TNotifyEvent read FOnActivate write FOnActivate;
|
||||
property OnClose: TCloseEvent read FOnClose write FOnClose stored IsForm;
|
||||
property OnCloseQuery : TCloseQueryEvent read FOnCloseQuery write FOnCloseQuery stored IsForm;
|
||||
property OnCloseQuery : TCloseQueryEvent
|
||||
read FOnCloseQuery write FOnCloseQuery stored IsForm;
|
||||
property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
|
||||
property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate;
|
||||
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
|
||||
|
@ -887,7 +887,7 @@ end;
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Here the initial form width and height are determined.
|
||||
Here the initial form left and top are determined.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomForm.UpdateShowing;
|
||||
var
|
||||
@ -895,14 +895,9 @@ var
|
||||
begin
|
||||
{$IFDEF CHECK_POSITION}
|
||||
writeln('[TCustomForm.UpdateShowing] A Class=',Classname);
|
||||
{$ENDIF}
|
||||
inherited UpdateShowing;
|
||||
{$IFDEF CHECK_POSITION}
|
||||
writeln('[TCustomForm.UpdateShowing] B Class=',Classname);
|
||||
{$ENDIF}
|
||||
{ If the the form is about to show, calculate its metrics }
|
||||
if Showing then
|
||||
begin
|
||||
if Visible then begin
|
||||
// first make sure X and Y are assigned
|
||||
X := Left;
|
||||
Y := Top;
|
||||
@ -933,12 +928,13 @@ writeln('[TCustomForm.UpdateShowing] B Class=',Classname);
|
||||
end;
|
||||
if X < 0 then X := 0;
|
||||
if Y < 0 then Y := 0;
|
||||
{$IFDEF CHECK_POSITION}
|
||||
writeln('[TCustomForm.UpdateShowing] C Class=',Classname);
|
||||
{$ENDIF}
|
||||
SetBounds(X, Y, Width, Height);
|
||||
end;
|
||||
{$IFDEF CHECK_POSITION}
|
||||
writeln('[TCustomForm.UpdateShowing] B Class=',Classname);
|
||||
{$ENDIF}
|
||||
inherited UpdateShowing;
|
||||
{$IFDEF CHECK_POSITION}
|
||||
writeln('[TCustomForm.UpdateShowing] END Class=',Classname);
|
||||
{$ENDIF}
|
||||
end;
|
||||
@ -973,6 +969,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.37 2002/03/18 11:44:41 lazarus
|
||||
MG: TForm.Position will now considered before creating form on 0,0
|
||||
|
||||
Revision 1.36 2002/03/16 21:40:55 lazarus
|
||||
MG: reduced size+move messages between lcl and interface
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user