mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 18:39:10 +02:00
lcl: formatting
git-svn-id: trunk@20769 -
This commit is contained in:
parent
b3be50f764
commit
dcc7044d85
@ -132,9 +132,9 @@ begin
|
|||||||
{$IFDEF NOTEBOOK_DEBUG}
|
{$IFDEF NOTEBOOK_DEBUG}
|
||||||
DebugLn(['TNBPages.Insert A ',FNoteBook.Name,' Index=',Index,' S="',S,'"']);
|
DebugLn(['TNBPages.Insert A ',FNoteBook.Name,' Index=',Index,' S="',S,'"']);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
NewOwner:=FNotebook.Owner;
|
NewOwner := FNotebook.Owner;
|
||||||
if NewOwner=nil then
|
if NewOwner = nil then
|
||||||
NewOwner:=FNotebook;
|
NewOwner := FNotebook;
|
||||||
NewPage := FNotebook.PageClass.Create(NewOwner);
|
NewPage := FNotebook.PageClass.Create(NewOwner);
|
||||||
with NewPage do
|
with NewPage do
|
||||||
Caption := S;
|
Caption := S;
|
||||||
@ -478,7 +478,8 @@ begin
|
|||||||
|
|
||||||
UpdateDesignerFlags(Index);
|
UpdateDesignerFlags(Index);
|
||||||
|
|
||||||
if HandleAllocated and (not (csLoading in ComponentState)) then begin
|
if HandleAllocated and (not (csLoading in ComponentState)) then
|
||||||
|
begin
|
||||||
AddRemovePageHandle(APage);
|
AddRemovePageHandle(APage);
|
||||||
if PageIndex = Index then
|
if PageIndex = Index then
|
||||||
DoSendPageIndex;
|
DoSendPageIndex;
|
||||||
|
@ -243,17 +243,18 @@ var
|
|||||||
List: TList;
|
List: TList;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
if (Parent<>nil) and (Parent is TCustomNotebook) then begin
|
if (Parent <> nil) and (Parent is TCustomNotebook) then
|
||||||
Result:=0;
|
begin
|
||||||
List:=TCustomNotebook(Parent).PageList;
|
Result := 0;
|
||||||
i:=0;
|
List := TCustomNotebook(Parent).PageList;
|
||||||
|
i := 0;
|
||||||
repeat
|
repeat
|
||||||
if i=List.Count then exit(-1);
|
if i = List.Count then exit(-1);
|
||||||
if (TObject(List[i])=Self) then exit;
|
if (TObject(List[i]) = Self) then exit;
|
||||||
if TCustomPage(List[i]).TabVisible or (csDesigning in ComponentState)
|
if TCustomPage(List[i]).TabVisible or (csDesigning in ComponentState)
|
||||||
then inc(Result);
|
then inc(Result);
|
||||||
inc(i);
|
inc(i);
|
||||||
until false;
|
until False;
|
||||||
end else
|
end else
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user