mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 11:09:38 +02:00
Adds some more capabilities to TNotebook
git-svn-id: trunk@28917 -
This commit is contained in:
parent
76f0a18ff0
commit
aa6519e1e0
lcl
@ -305,8 +305,8 @@ type
|
||||
FPages: TStrings; // TUNBPages
|
||||
FPageIndex: Integer;
|
||||
FPageList: TListWithEvent;
|
||||
{ function GetActivePage: String;
|
||||
function GetActivePageComponent: TCustomPage;}
|
||||
function GetActivePage: String;
|
||||
function GetActivePageComponent: TPage;
|
||||
function GetPage(AIndex: Integer): TPage;
|
||||
function GetPageCount : integer;
|
||||
function GetPageIndex: Integer;
|
||||
@ -316,7 +316,6 @@ type
|
||||
procedure RemovePage(Index: Integer);
|
||||
procedure SetActivePage(const Value: String);}
|
||||
procedure SetPageIndex(AValue: Integer);
|
||||
{ procedure ShowCurrentPage;}
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -330,10 +329,11 @@ type
|
||||
property PageCount: integer read GetPageCount;
|
||||
// property PageList: TList read FPageList;
|
||||
published
|
||||
// TUntabbedNotebook specific properties
|
||||
// LCL TNotebook specific properties
|
||||
property PageIndex: Integer read GetPageIndex write SetPageIndex default -1;
|
||||
property Pages: TStrings read FPages;
|
||||
// property ActivePage: String read GetActivePage write SetActivePage;
|
||||
property ActivePage: String read GetActivePage;// write SetActivePage;
|
||||
property ActivePageComponent: TPage read GetActivePageComponent;// write SetActivePage;
|
||||
// Generic properties
|
||||
property Align;
|
||||
property Anchors;
|
||||
|
@ -133,6 +133,15 @@ end;
|
||||
{******************************************************************************
|
||||
TNotebook
|
||||
******************************************************************************}
|
||||
function TNotebook.GetActivePage: String;
|
||||
begin
|
||||
Result := Page[GetPageIndex].Caption;
|
||||
end;
|
||||
|
||||
function TNotebook.GetActivePageComponent: TPage;
|
||||
begin
|
||||
Result := Page[GetPageIndex];
|
||||
end;
|
||||
|
||||
function TNotebook.GetPage(AIndex: Integer): TPage;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user