MG: improved TScreen and ShowModal

git-svn-id: trunk@2954 -
This commit is contained in:
lazarus 2002-08-18 08:56:31 +00:00
parent db5b578e3b
commit 9c894eee04
2 changed files with 11 additions and 8 deletions

View File

@ -3441,10 +3441,11 @@ begin
inherited Create(AOwner);
if LazarusResources.Find(ClassName)=nil then begin
position := poScreenCenter;
Position := poScreenCenter;
Width := 250;
Height := 100;
Caption := 'Goto';
Caption := 'Goto line';
BorderStyle:= bsDialog;
Label1 := TLabel.Create(self);
with Label1 do

View File

@ -33,6 +33,7 @@ begin
FHintFont.Style := [];
FHintFont.Size := 12;
FHintFont.Pitch := fpDefault;
FSaveFocusedList := TList.Create;
end;
{------------------------------------------------------------------------------
@ -45,7 +46,11 @@ end;
Destructor TScreen.Destroy;
begin
FHintFont.Free;
FHintFont:=nil;
FFormList.Free;
FFormList:=nil;
FSaveFocusedList.Free;
FSaveFocusedList:=nil;
inherited Destroy;
end;
{
@ -91,11 +96,8 @@ end;
This function is used by the Forms property.
------------------------------------------------------------------------------}
Function TScreen.GetForms(IIndex: Integer): TForm;
var
FForm: TForm;
begin
FForm := TForm(FFormList.Items[IIndex]);
Result := FForm;
Result := TForm(FFormList.Items[IIndex]);
end;
@ -108,7 +110,7 @@ end;
------------------------------------------------------------------------------}
Function TScreen.GetWidth : Integer;
begin
result := GetSystemMetrics(SM_CXSCREEN);
Result := GetSystemMetrics(SM_CXSCREEN);
end;
@ -121,7 +123,7 @@ end;
------------------------------------------------------------------------------}
Function TScreen.GetHeight : Integer;
begin
result := GetSystemMetrics(SM_CYSCREEN);
Result := GetSystemMetrics(SM_CYSCREEN);
end;
{------------------------------------------------------------------------------