mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 02:48:31 +02:00
Moves ChildClassAllowed to TPageControl and ifdefs out the new tabcontrol
git-svn-id: trunk@31849 -
This commit is contained in:
parent
3677e97597
commit
e102c28b17
@ -374,7 +374,6 @@ type
|
||||
function DialogChar(var Message: TLMKey): boolean; override;
|
||||
procedure ShowControl(APage: TControl); override;
|
||||
procedure UpdateTabProperties; virtual;
|
||||
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
||||
class function GetControlClassDefaultSize: TSize; override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
property ActivePageComponent: TCustomPage read GetActivePageComponent
|
||||
@ -510,6 +509,7 @@ type
|
||||
procedure DoRemoveDockClient(Client: TControl); override;
|
||||
function DoUndockClientMsg(NewTarget, Client: TControl):boolean; override;
|
||||
procedure DoChange; override;
|
||||
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
function FindNextPage(CurPage: TTabSheet;
|
||||
@ -806,6 +806,8 @@ type
|
||||
property Visible;
|
||||
end;
|
||||
|
||||
{$ifdef LCL_NEW_TABCONTROL}
|
||||
|
||||
{ TNewTabControl }
|
||||
|
||||
(* TNewTabControl is a replacement for TTabControl, derived from TCustomTabControl.
|
||||
@ -881,6 +883,8 @@ type
|
||||
property Visible;
|
||||
end;
|
||||
|
||||
{$endif}
|
||||
|
||||
{ Custom draw }
|
||||
|
||||
TCustomDrawTarget = (
|
||||
@ -3452,7 +3456,9 @@ end;
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('Common Controls',[TTrackbar,TProgressBar,TTreeView,
|
||||
TListView,TStatusBar,TToolBar,TUpDown,TPageControl,TTabControl,THeaderControl]);
|
||||
TListView,TStatusBar,TToolBar,TUpDown,TPageControl,TTabControl,
|
||||
{$ifdef LCL_NEW_TABCONTROL}TNewTabControl,{$endif}
|
||||
THeaderControl]);
|
||||
RegisterNoIcon([TToolButton,TTabSheet]);
|
||||
end;
|
||||
|
||||
|
@ -874,11 +874,6 @@ begin
|
||||
TWSCustomPageClass(Page[i].WidgetSetClass).UpdateProperties(Page[i]);
|
||||
end;
|
||||
|
||||
function TCustomTabControl.ChildClassAllowed(ChildClass: TClass): boolean;
|
||||
begin
|
||||
Result:=(ChildClass<>nil) and (ChildClass.InheritsFrom(PageClass));
|
||||
end;
|
||||
|
||||
class function TCustomTabControl.GetControlClassDefaultSize: TSize;
|
||||
begin
|
||||
Result.CX := 200;
|
||||
|
@ -115,6 +115,11 @@ begin
|
||||
OnChange(Self);
|
||||
end;
|
||||
|
||||
function TPageControl.ChildClassAllowed(ChildClass: TClass): boolean;
|
||||
begin
|
||||
Result:=(ChildClass<>nil) and (ChildClass.InheritsFrom(PageClass));
|
||||
end;
|
||||
|
||||
constructor TPageControl.Create(TheOwner: TComponent);
|
||||
begin
|
||||
PageClass:=TTabSheet;
|
||||
|
@ -689,6 +689,8 @@ begin
|
||||
Result:=(FTabs<>nil) and TTabControlStrings(fTabs).IsUpdating;
|
||||
end;
|
||||
|
||||
{$ifdef LCL_NEW_TABCONTROL}
|
||||
|
||||
{ TTabPage }
|
||||
|
||||
type
|
||||
@ -838,6 +840,7 @@ begin
|
||||
Dec(FPageIndex);
|
||||
end;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
// included by comctrls.pp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user