AFAIK mdi has been discontinued in lazarus, this can be simulated to some extent by using a pagecontrol or note book and dynamically creating the page as shown in the psuedo code.
procedure TfMain.newEditMemo(aName: string);
begin
Screen.Cursor := crHourGlass;
try
//create tabsheet to hold the memo and gutter, assign to the page control
newTabsheet := TTabSheet.Create(pcEditor);
newTabsheet.Parent := pcEditor;
newTabsheet.Caption := aName;
//newTabsheet.Hint := Name;
fMain.ParentShowHint := False;
fMain.ShowHint := False;
fMain.Caption := MainCaption + newTabsheet.Caption;
newTabsheet.ImageIndex := 0;
newTabsheet.ShowHint := False;
newTabsheet.ParentShowHint := False;
newTabsheet.PageControl := pcEditor;
pcEditor.ActivePage := newTabsheet;
pcEditor.ParentShowHint := False;
// create Memo and align, set Properties
newMemo := TSynMemo.Create(newTabsheet);
newMemo.Parent := newTabsheet;
newMemo.Align := alClient;
newMemo.WantTabs := True;
newMemo.HideSelection := True;
newMemo.OnChange := @newMemoChange;
newMemo.OnDragDrop := @NewMemoDragDrop;
newMemo.OnDragOver := @NewMemoDragOver;
newMemo.ParentShowHint := False;
newMemo.ShowHint := False;
newMemo.PopupMenu := puEditor;
{If Not Assigned(newMemo.Highlighter) Then
newMemo.Highlighter := URLS; }
autoComp.Editor := newMemo;
setFonts.SynMemo := newMemo;
//TextSetup;
ActiveControl := newMemo;
newMemo.Modified := False;
finally
Screen.Cursor := crDefault;
setFonts.ReadSMemoFonts;
end;
end;
Regards
Dave