mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:00:16 +02:00
Adds more parameters to TPage.OnBeforeShow
git-svn-id: trunk@27586 -
This commit is contained in:
parent
2245928805
commit
e70299b39d
@ -319,11 +319,15 @@ type
|
|||||||
property TabStop;
|
property TabStop;
|
||||||
end deprecated;
|
end deprecated;
|
||||||
|
|
||||||
|
TUNBPage = class;
|
||||||
|
|
||||||
|
TBeforeShowPageEvent = procedure (ASender: TObject; ANewPage: TUNBPage; ANewIndex: Integer) of object;
|
||||||
|
|
||||||
{ TUNBPage }
|
{ TUNBPage }
|
||||||
|
|
||||||
TUNBPage = class(TCustomControl)
|
TUNBPage = class(TCustomControl)
|
||||||
private
|
private
|
||||||
FOnBeforeShow: TNotifyEvent;
|
FOnBeforeShow: TBeforeShowPageEvent;
|
||||||
protected
|
protected
|
||||||
procedure SetParent(AParent: TWinControl); override;
|
procedure SetParent(AParent: TWinControl); override;
|
||||||
public
|
public
|
||||||
@ -333,7 +337,7 @@ type
|
|||||||
// Lazarus-specific TPage events
|
// Lazarus-specific TPage events
|
||||||
// OnBeforeShow occurs before a page is displayed, so that
|
// OnBeforeShow occurs before a page is displayed, so that
|
||||||
// preparations can be executed in it's user interface, for example
|
// preparations can be executed in it's user interface, for example
|
||||||
property OnBeforeShow: TNotifyEvent read FOnBeforeShow write FOnBeforeShow;
|
property OnBeforeShow: TBeforeShowPageEvent read FOnBeforeShow write FOnBeforeShow;
|
||||||
// Other events
|
// Other events
|
||||||
property ChildSizing;
|
property ChildSizing;
|
||||||
property ClientWidth;
|
property ClientWidth;
|
||||||
|
@ -177,7 +177,7 @@ begin
|
|||||||
FPageIndex := AValue;
|
FPageIndex := AValue;
|
||||||
|
|
||||||
// And show the new one
|
// And show the new one
|
||||||
if Assigned(Page[FPageIndex].FOnBeforeShow) then Page[FPageIndex].FOnBeforeShow(Self); // OnBeforeShow event
|
if Assigned(Page[FPageIndex].FOnBeforeShow) then Page[FPageIndex].FOnBeforeShow(Self, Page[FPageIndex], FPageIndex); // OnBeforeShow event
|
||||||
Page[FPageIndex].Visible := True;
|
Page[FPageIndex].Visible := True;
|
||||||
Page[FPageIndex].ControlStyle :=
|
Page[FPageIndex].ControlStyle :=
|
||||||
Page[FPageIndex].ControlStyle - [csNoDesignVisible];
|
Page[FPageIndex].ControlStyle - [csNoDesignVisible];
|
||||||
|
Loading…
Reference in New Issue
Block a user