mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-13 12:41:31 +01:00
Adds some more capabilities to TNotebook
git-svn-id: trunk@28917 -
This commit is contained in:
parent
76f0a18ff0
commit
aa6519e1e0
@ -305,8 +305,8 @@ type
|
|||||||
FPages: TStrings; // TUNBPages
|
FPages: TStrings; // TUNBPages
|
||||||
FPageIndex: Integer;
|
FPageIndex: Integer;
|
||||||
FPageList: TListWithEvent;
|
FPageList: TListWithEvent;
|
||||||
{ function GetActivePage: String;
|
function GetActivePage: String;
|
||||||
function GetActivePageComponent: TCustomPage;}
|
function GetActivePageComponent: TPage;
|
||||||
function GetPage(AIndex: Integer): TPage;
|
function GetPage(AIndex: Integer): TPage;
|
||||||
function GetPageCount : integer;
|
function GetPageCount : integer;
|
||||||
function GetPageIndex: Integer;
|
function GetPageIndex: Integer;
|
||||||
@ -316,7 +316,6 @@ type
|
|||||||
procedure RemovePage(Index: Integer);
|
procedure RemovePage(Index: Integer);
|
||||||
procedure SetActivePage(const Value: String);}
|
procedure SetActivePage(const Value: String);}
|
||||||
procedure SetPageIndex(AValue: Integer);
|
procedure SetPageIndex(AValue: Integer);
|
||||||
{ procedure ShowCurrentPage;}
|
|
||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -330,10 +329,11 @@ type
|
|||||||
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
|
// LCL TNotebook specific properties
|
||||||
property PageIndex: Integer read GetPageIndex write SetPageIndex default -1;
|
property PageIndex: Integer read GetPageIndex write SetPageIndex default -1;
|
||||||
property Pages: TStrings read FPages;
|
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
|
// Generic properties
|
||||||
property Align;
|
property Align;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
|
|||||||
@ -133,6 +133,15 @@ end;
|
|||||||
{******************************************************************************
|
{******************************************************************************
|
||||||
TNotebook
|
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;
|
function TNotebook.GetPage(AIndex: Integer): TPage;
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user