mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:19:22 +02:00
Fixes compiling the examples with the new notebook.
git-svn-id: trunk@28916 -
This commit is contained in:
parent
c4099a7d6a
commit
76f0a18ff0
@ -49,9 +49,7 @@ type
|
|||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
procedure Button3Click(Sender: TObject);
|
procedure Button3Click(Sender: TObject);
|
||||||
procedure Button4Click(Sender: TObject);
|
|
||||||
procedure Button5Click(Sender: TObject);
|
procedure Button5Click(Sender: TObject);
|
||||||
procedure Button6Click(Sender: TObject);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -234,7 +232,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Create Show/Hide Tabs Button on first page of TabbedNotebook
|
// Create Show/Hide Tabs Button on first page of TabbedNotebook
|
||||||
fButton4 := TButton.Create(fNotebook.Page[0]);
|
{ fButton4 := TButton.Create(fNotebook.Page[0]);
|
||||||
with fButton4 do
|
with fButton4 do
|
||||||
begin
|
begin
|
||||||
Parent := fNotebook.Page[0];
|
Parent := fNotebook.Page[0];
|
||||||
@ -245,7 +243,7 @@ begin
|
|||||||
top := 150;
|
top := 150;
|
||||||
Caption := 'Hide Tabs';
|
Caption := 'Hide Tabs';
|
||||||
Show;
|
Show;
|
||||||
end;
|
end;}
|
||||||
|
|
||||||
// Create Delete Page Button on third page of TabbedNotebook
|
// Create Delete Page Button on third page of TabbedNotebook
|
||||||
fButton5 := TButton.Create(fNotebook.Page[2]);
|
fButton5 := TButton.Create(fNotebook.Page[2]);
|
||||||
@ -261,20 +259,6 @@ begin
|
|||||||
Show;
|
Show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Create Set Tabs Position Button on first page of TabbedNotebook
|
|
||||||
fButton6 := TButton.Create(fNotebook.Page[0]);
|
|
||||||
with fButton6 do
|
|
||||||
begin
|
|
||||||
Parent := fNotebook.Page[0];
|
|
||||||
OnClick := @Button6Click;
|
|
||||||
Width := 150;
|
|
||||||
Height := 23;
|
|
||||||
left := (250 {Parent.Widht} - Width) div 2;
|
|
||||||
top := 190;
|
|
||||||
Caption := 'Set Tab Position';
|
|
||||||
Show;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// Goto the first page of the Notebook
|
// Goto the first page of the Notebook
|
||||||
fNotebk.PageIndex := 0;
|
fNotebk.PageIndex := 0;
|
||||||
end;
|
end;
|
||||||
@ -297,17 +281,6 @@ begin
|
|||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.Button4Click(Sender: TObject);
|
|
||||||
begin
|
|
||||||
//writeln('Show/Hide Tabs Button Clicked');
|
|
||||||
|
|
||||||
fNotebook.ShowTabs := not fNotebook.ShowTabs;
|
|
||||||
if (fNotebook.ShowTabs) then
|
|
||||||
fButton4.Caption := 'Hide Tabs'
|
|
||||||
else
|
|
||||||
fButton4.Caption := 'Show Tabs';
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TForm1.Button5Click(Sender: TObject);
|
procedure TForm1.Button5Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
//writeln('Delete Page Button Clicked');
|
//writeln('Delete Page Button Clicked');
|
||||||
@ -320,21 +293,6 @@ begin
|
|||||||
else
|
else
|
||||||
fNotebook.Pages.Delete(fNotebook.Pages.Count - 1);
|
fNotebook.Pages.Delete(fNotebook.Pages.Count - 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TForm1.Button6Click(Sender: TObject);
|
|
||||||
begin
|
|
||||||
//writeln('Set Tab Position Button Clicked');
|
|
||||||
|
|
||||||
if fNotebook.TabPosition = tpTop then
|
|
||||||
fNotebook.TabPosition := tpRight
|
|
||||||
else if fNotebook.TabPosition = tpRight then
|
|
||||||
fNotebook.TabPosition := tpBottom
|
|
||||||
else if fNotebook.TabPosition = tpBottom then
|
|
||||||
fNotebook.TabPosition := tpLeft
|
|
||||||
else if fNotebook.TabPosition = tpLeft then
|
|
||||||
fNotebook.TabPosition := tpTop;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -308,7 +308,7 @@ type
|
|||||||
{ function GetActivePage: String;
|
{ function GetActivePage: String;
|
||||||
function GetActivePageComponent: TCustomPage;}
|
function GetActivePageComponent: TCustomPage;}
|
||||||
function GetPage(AIndex: Integer): TPage;
|
function GetPage(AIndex: Integer): TPage;
|
||||||
// function GetPageCount : integer;
|
function GetPageCount : integer;
|
||||||
function GetPageIndex: Integer;
|
function GetPageIndex: Integer;
|
||||||
{ function FindVisiblePage(Index: Integer): Integer;}
|
{ function FindVisiblePage(Index: Integer): Integer;}
|
||||||
procedure InsertPage(APage: TPage; Index: Integer);
|
procedure InsertPage(APage: TPage; Index: Integer);
|
||||||
@ -327,7 +327,7 @@ type
|
|||||||
function CustomPage(Index: integer): TCustomPage;}
|
function CustomPage(Index: integer): TCustomPage;}
|
||||||
public
|
public
|
||||||
property Page[Index: Integer]: TPage read GetPage;
|
property Page[Index: Integer]: TPage read GetPage;
|
||||||
// property PageCount: integer read GetPageCount;
|
property PageCount: integer read GetPageCount;
|
||||||
// property PageList: TList read FPageList;
|
// property PageList: TList read FPageList;
|
||||||
published
|
published
|
||||||
// TUntabbedNotebook specific properties
|
// TUntabbedNotebook specific properties
|
||||||
|
@ -141,6 +141,11 @@ begin
|
|||||||
Result := TPage(FPageList.Items[AIndex]);
|
Result := TPage(FPageList.Items[AIndex]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TNotebook.GetPageCount: Integer;
|
||||||
|
begin
|
||||||
|
Result := FPages.Count;
|
||||||
|
end;
|
||||||
|
|
||||||
function TNotebook.GetPageIndex: Integer;
|
function TNotebook.GetPageIndex: Integer;
|
||||||
begin
|
begin
|
||||||
Result := FPageIndex;
|
Result := FPageIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user