LCL: test, fixed compilation

git-svn-id: trunk@42676 -
This commit is contained in:
martin 2013-09-08 10:26:19 +00:00
parent 49cd2ecb33
commit a21b56c554

View File

@ -56,6 +56,8 @@ type
{ TForm1 }
procedure TForm1.Form1Create(Sender: TObject);
var
i: Integer;
begin
debugln('TForm1.Form1Create ',DbgSName(Sender));
SetBounds(50,50,500,400);
@ -140,6 +142,10 @@ begin
ButtonsGroupBox.ChildSizing.ControlsPerLine:=2;
ButtonsGroupBox.ChildSizing.Layout:=cclLeftToRightThenTopToBottom;
for i:=0 to 2 do AddNewPage(i);
FillPagesListBox;
end;
procedure TForm1.DeletePageButtonClick(Sender: TObject);
@ -225,14 +231,10 @@ begin
end;
constructor TForm1.Create(TheOwner: TComponent);
var
i: Integer;
begin
OnCreate:=@Form1Create;
inherited Create(TheOwner);
// start with 3 pages
for i:=0 to 2 do AddNewPage(i);
FillPagesListBox;
end;
procedure TForm1.AddNewPage(Index: integer);
@ -245,7 +247,8 @@ begin
while FindComponent(NewName)<>nil do NewName:=CreateNextIdentifier(NewName);
NewPage.Name:=NewName;
NewPage.Caption:=NewName;
PageControl1.PageList.Insert(Index,NewPage);
NewPage.PageControl := PageControl1;
NewPage.PageIndex := Index;
PageControl1.PageIndex:=Index;
FillPagesListBox;
PagesListBox.ItemIndex:=PageControl1.PageIndex;