set transient forms with Screen object order

git-svn-id: trunk@3954 -
This commit is contained in:
mattias 2003-03-18 13:45:39 +00:00
parent 002ca709d8
commit b54d888214
2 changed files with 20 additions and 0 deletions

View File

@ -497,6 +497,8 @@ type
public
constructor Create(AOwner : TComponent); override;
destructor Destroy; Override;
function CustomFormIndex(AForm: TCustomForm): integer;
function FormIndex(AForm: TForm): integer;
public
property ActiveControl: TWinControl read FActiveControl;
property ActiveCustomForm: TCustomForm read FActiveCustomForm;

View File

@ -59,6 +59,24 @@ begin
inherited Destroy;
end;
{------------------------------------------------------------------------------
function TScreen.CustomFormIndex(AForm: TCustomForm): integer;
------------------------------------------------------------------------------}
function TScreen.CustomFormIndex(AForm: TCustomForm): integer;
begin
Result:=FCustomForms.Count-1;
while (Result>=0) and (CustomForms[Result]<>AForm) do dec(Result);
end;
{------------------------------------------------------------------------------
function TScreen.FormIndex(AForm: TForm): integer;
------------------------------------------------------------------------------}
function TScreen.FormIndex(AForm: TForm): integer;
begin
Result:=FFormList.Count-1;
while (Result>=0) and (Forms[Result]<>AForm) do dec(Result);
end;
{------------------------------------------------------------------------------
function TScreen.GetFonts : TStrings;
------------------------------------------------------------------------------}