mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 04:48:03 +02:00
* AddControlToEditor
This commit is contained in:
parent
853cd26124
commit
f613a7acf6
@ -312,6 +312,7 @@ type
|
||||
// Editor Page Caption update
|
||||
procedure AddUpdateEditorPageCaptionHandler(AEvent: TNotifyEvent; const AsLast: Boolean = True); virtual; abstract;
|
||||
procedure RemoveUpdateEditorPageCaptionHandler(AEvent: TNotifyEvent); virtual; abstract;
|
||||
procedure AddControlToEditor(aSourceEditor : TSourceEditorInterface; aControl : TControl; aAlign : TAlign); virtual; abstract;
|
||||
property BaseCaption: String read GetBaseCaption write SetBaseCaption;
|
||||
|
||||
function AddStatusPanel(AnOwner: TClass; ATag: PtrUInt = 0): TSourceEditorStatusPanelInterface; virtual; abstract;
|
||||
|
@ -925,6 +925,7 @@ type
|
||||
function IndexOfEditorInShareWith(AnOtherEditor: TSourceEditorInterface): Integer; override;
|
||||
procedure MoveEditor(OldPageIndex, NewPageIndex: integer);
|
||||
procedure MoveEditor(OldPageIndex, NewWindowIndex, NewPageIndex: integer);
|
||||
procedure AddControlToEditor(aSourceEditor : TSourceEditorInterface; aControl : TControl; aAlign : TAlign); override;
|
||||
|
||||
procedure UpdateStatusBar;
|
||||
function AddStatusPanel(AnOwner: TClass; ATag: PtrUInt = 0): TSourceEditorStatusPanelInterface; override;
|
||||
@ -8505,6 +8506,28 @@ begin
|
||||
Manager.ActiveEditor := Edit;
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.AddControlToEditor(
|
||||
aSourceEditor: TSourceEditorInterface; aControl: TControl; aAlign: TAlign);
|
||||
|
||||
var
|
||||
I,lPageIndex : Integer;
|
||||
TabSheet : TTabSheet;
|
||||
|
||||
begin
|
||||
for i := 0 to EditorCount - 1 do
|
||||
if Editors[i]=aSourceEditor then
|
||||
begin
|
||||
lPageIndex:=Editors[i].PageIndex;
|
||||
TabSheet:=GetNoteBookPage(lPageIndex);
|
||||
if Assigned(TabSheet) then
|
||||
begin
|
||||
aControl.Parent:=TabSheet;
|
||||
// Force alignment
|
||||
aControl.Align:=aAlign;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.CopyEditor(OldPageIndex, NewWindowIndex,
|
||||
NewPageIndex: integer; Focus: Boolean = False);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user