Forum > General
[CLOSED] Automate IDE
pcurtis:
Show the form designer from after using project templates.
GetMem:
@pcurtis
I'm not gonna play this game, this is the last one:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses SrcEditorIntf, LazIDEIntf;//..var EditorForm: TCustomForm;begin if SourceEditorManagerIntf.ActiveEditor <> nil then begin SourceEditorManagerIntf.ActiveSourceWindow.Show; SourceEditorManagerIntf.ActiveSourceWindow.BringToFront; LazarusIDE.DoShowDesignerFormOfSrc(SourceEditorManagerIntf.ActiveEditor, EditorForm); if EditorForm <> nil then begin EditorForm.Show; EditorForm.BringToFront; end; end;end;
pcurtis:
What game?
Anyway that doesn't work.
I tried in idetemplateproject.pp
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Procedure DoProject(Sender : TObject); Var I : Integer; Desc : TTemplateProjectDescriptor; fn: string; EditorForm: TCustomForm; begin I:=MenuList.count-1; Desc:=Nil; While (Desc=Nil) and (I>=0) do begin With TIDEObject(MenuList[i]) do if FProjMenu=Sender then Desc:=FProjDesc; Dec(i); end; If Desc=Nil then exit; If Desc.ShowOptionsDialog<>mrOk then exit; Desc.Template.CreateProject(Desc.FProjectDirectory,Desc.FVariables); fn:=Desc.FProjectDirectory+Desc.FProjectName; // FileReplaceText(fn+'.lpi',Desc.FTemplate.ProjectFile,Desc.FProjectName); FileReplaceText(fn+'.lpr',Desc.FTemplate.ProjectFile,Desc.FProjectName); FileReplaceText(fn+'.lps',Desc.FTemplate.ProjectFile,Desc.FProjectName); LazarusIDE.DoOpenProjectFile(Desc.FProjectDirectory+Desc.FProjectName+'.lpr', [ofProjectLoading,ofOnlyIfExists,ofConvertMacros,ofDoLoadResource]); if SourceEditorManagerIntf.ActiveEditor <> nil then begin SourceEditorManagerIntf.ActiveSourceWindow.Show; SourceEditorManagerIntf.ActiveSourceWindow.BringToFront; LazarusIDE.DoShowDesignerFormOfSrc(SourceEditorManagerIntf.ActiveEditor, EditorForm); if EditorForm <> nil then begin EditorForm.Show; EditorForm.BringToFront; end; end; end;
SourceEditorManagerIntf.ActiveEditor is sometimes nil.
Navigation
[0] Message Index
[*] Previous page