mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-02 22:27:30 +01:00
IDE: Move SelectButton from ComponentReg interface to TComponentPage.
git-svn-id: trunk@48305 -
This commit is contained in:
parent
159ba4fccf
commit
443c7df5a4
@ -134,7 +134,6 @@ type
|
||||
private
|
||||
FPageName: string;
|
||||
FPalette: TBaseComponentPalette;
|
||||
FSelectButton: TComponent;
|
||||
FVisible: boolean;
|
||||
protected
|
||||
procedure SetVisible(const AValue: boolean); virtual;
|
||||
@ -145,7 +144,6 @@ type
|
||||
public
|
||||
property PageName: string read FPageName;
|
||||
property Palette: TBaseComponentPalette read FPalette write FPalette;
|
||||
property SelectButton: TComponent read FSelectButton write FSelectButton;
|
||||
property Visible: boolean read FVisible write SetVisible;
|
||||
end;
|
||||
|
||||
@ -553,7 +551,6 @@ end;
|
||||
|
||||
destructor TBaseComponentPage.Destroy;
|
||||
begin
|
||||
FreeAndNil(FSelectButton);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
||||
@ -82,6 +82,7 @@ type
|
||||
TComponentPage = class(TBaseComponentPage)
|
||||
private
|
||||
fPageComponent: TCustomPage;
|
||||
fSelectButton: TComponent;
|
||||
fBtnIndex: integer;
|
||||
fIndex: Integer; // Index in the Pages container.
|
||||
fCompNames: TStringList; // Reference to component names.
|
||||
@ -98,7 +99,9 @@ type
|
||||
constructor Create(const ThePageName: string);
|
||||
destructor Destroy; override;
|
||||
function GetScrollBox: TScrollBox;
|
||||
public
|
||||
property PageComponent: TCustomPage read fPageComponent write fPageComponent;
|
||||
property SelectButton: TComponent read fSelectButton write fSelectButton;
|
||||
end;
|
||||
|
||||
{ TComponentPalette }
|
||||
@ -305,6 +308,7 @@ end;
|
||||
|
||||
destructor TComponentPage.Destroy;
|
||||
begin
|
||||
FreeAndNil(fSelectButton);
|
||||
FreeAndNil(fPageComponent);
|
||||
inherited Destroy;
|
||||
end;
|
||||
@ -820,7 +824,7 @@ begin
|
||||
for i:=0 to Pages.Count-1 do begin
|
||||
CurPage:=Pages[i];
|
||||
if (FSelected=nil) or (FSelected.RealPage<>CurPage) then begin
|
||||
SelectButtonOnPage:=TSpeedButton(CurPage.SelectButton);
|
||||
SelectButtonOnPage:=TSpeedButton(TComponentPage(CurPage).SelectButton);
|
||||
if SelectButtonOnPage<>nil then
|
||||
SelectButtonOnPage.Down:=true;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user