mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 20:09:29 +02:00
Improves TUntabbedNotebook
git-svn-id: trunk@27139 -
This commit is contained in:
parent
277dda4e82
commit
5be39fc3e2
@ -936,10 +936,17 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TUntabbedNotebookComponentEditor.ShowPageMenuItemClick(Sender: TObject
|
||||
);
|
||||
procedure TUntabbedNotebookComponentEditor.ShowPageMenuItemClick(Sender: TObject);
|
||||
var
|
||||
AMenuItem: TMenuItem;
|
||||
NewPageIndex: integer;
|
||||
begin
|
||||
|
||||
AMenuItem:=TMenuItem(Sender);
|
||||
if (AMenuItem=nil) or (not (AMenuItem is TMenuItem)) then exit;
|
||||
NewPageIndex:=AMenuItem.MenuIndex;
|
||||
if (NewPageIndex<0) or (NewPageIndex>=Notebook.Pages.Count) then exit;
|
||||
NoteBook.PageIndex:=NewPageIndex;
|
||||
GetDesigner.SelectOnlyThisComponent(NoteBook.Page[NoteBook.PageIndex]);
|
||||
end;
|
||||
|
||||
procedure TUntabbedNotebookComponentEditor.ExecuteVerb(Index: Integer);
|
||||
|
@ -323,6 +323,7 @@ type
|
||||
|
||||
TUNBPage = class(TCustomControl)
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
@ -21,6 +21,19 @@
|
||||
|
||||
{ TUNBPage }
|
||||
|
||||
constructor TUNBPage.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
|
||||
ControlStyle := ControlStyle +
|
||||
[csAcceptsControls, csDesignFixedBounds, csNoDesignVisible, csNoFocus];
|
||||
|
||||
// height and width depends on parent, align to client rect
|
||||
Align := alClient;
|
||||
Caption := '';
|
||||
Visible := False;
|
||||
end;
|
||||
|
||||
destructor TUNBPage.Destroy;
|
||||
begin
|
||||
{$ifdef DEBUG_NEW_NOTEBOOK}
|
||||
|
Loading…
Reference in New Issue
Block a user