mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 11:49:41 +02:00
Adds more parameters to TPage.OnBeforeShow
git-svn-id: trunk@27586 -
This commit is contained in:
parent
2245928805
commit
e70299b39d
lcl
@ -319,11 +319,15 @@ type
|
||||
property TabStop;
|
||||
end deprecated;
|
||||
|
||||
TUNBPage = class;
|
||||
|
||||
TBeforeShowPageEvent = procedure (ASender: TObject; ANewPage: TUNBPage; ANewIndex: Integer) of object;
|
||||
|
||||
{ TUNBPage }
|
||||
|
||||
TUNBPage = class(TCustomControl)
|
||||
private
|
||||
FOnBeforeShow: TNotifyEvent;
|
||||
FOnBeforeShow: TBeforeShowPageEvent;
|
||||
protected
|
||||
procedure SetParent(AParent: TWinControl); override;
|
||||
public
|
||||
@ -333,7 +337,7 @@ type
|
||||
// Lazarus-specific TPage events
|
||||
// OnBeforeShow occurs before a page is displayed, so that
|
||||
// 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
|
||||
property ChildSizing;
|
||||
property ClientWidth;
|
||||
|
@ -177,7 +177,7 @@ begin
|
||||
FPageIndex := AValue;
|
||||
|
||||
// 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].ControlStyle :=
|
||||
Page[FPageIndex].ControlStyle - [csNoDesignVisible];
|
||||
|
Loading…
Reference in New Issue
Block a user