设计器
优化tfm文件读取,优化设计器中载入窗口闪烁问题
This commit is contained in:
@@ -1010,7 +1010,7 @@ type TVclDesigner = class(tvcform)
|
||||
try
|
||||
prs := array();
|
||||
obarray := array();
|
||||
loadtfmtotree(Ptfm,Ptfm.gettree2,FTree.RootItem,FTree,prs,obarray,const inh);
|
||||
loadtfmtotree(Ptfm,Ptfm.gettree2,FTree.RootItem,FTree,prs,obarray,const inh,1);
|
||||
for i,v in prs do
|
||||
begin
|
||||
va := obarray[v[2]];
|
||||
@@ -1024,7 +1024,7 @@ type TVclDesigner = class(tvcform)
|
||||
end ;
|
||||
FTree.Loading := nil;
|
||||
end
|
||||
function loadtfmtotree(p,d,node,wr,prs,obarray,inhname);//当如信息
|
||||
function loadtfmtotree(p,d,node,wr,prs,obarray,inhname,first);//当如信息
|
||||
begin
|
||||
{**
|
||||
@explan(说明) 导入tfm文件 %%
|
||||
@@ -1047,12 +1047,13 @@ type TVclDesigner = class(tvcform)
|
||||
it.Imgs := fdimagelist.GetImageId("tdcreateform");
|
||||
end
|
||||
comp := it.ComponentCreater(node,wr);
|
||||
//if first then comp.Cwnd.visible := false;
|
||||
comp.isinherited := d["inherited"];
|
||||
comp.inheritedparent := d["parent"];
|
||||
comp.name := d["name"];
|
||||
obarray[d["name"]] := comp;
|
||||
FVariableSelecter.additem(comp);
|
||||
BindCwndMessage(comp.Cwnd);
|
||||
//BindCwndMessage(comp.Cwnd);
|
||||
pubs := comp.GetPublishProperties() union comp.GetPublishEvents();
|
||||
dprop := d["property"];
|
||||
ddp := array();
|
||||
@@ -1088,7 +1089,11 @@ type TVclDesigner = class(tvcform)
|
||||
lazy[length(lazy)] := array(n,setddpv,pp);
|
||||
continue;
|
||||
end
|
||||
comp.SetComponentProperties(n,setddpv,pp);
|
||||
if first and n="visible" then
|
||||
begin
|
||||
firstvisible := array(comp,setddpv,pp);
|
||||
end else
|
||||
comp.SetComponentProperties(n,setddpv,pp);
|
||||
end
|
||||
for i,v in d["object"] do
|
||||
begin
|
||||
@@ -1097,7 +1102,16 @@ type TVclDesigner = class(tvcform)
|
||||
for i,v in lazy do
|
||||
begin
|
||||
comp.SetComponentProperties(v[0],v[1],v[2]);
|
||||
end
|
||||
if firstvisible then
|
||||
begin
|
||||
comp.SetComponentProperties("visible",firstvisible[1],firstvisible[2]);
|
||||
end
|
||||
if first then
|
||||
begin
|
||||
comp.Cwnd.Handle;
|
||||
end
|
||||
BindCwndMessage(comp.Cwnd);
|
||||
//comp.DoControlAlign();
|
||||
end
|
||||
function SetFunctionList(v); //设置函数信息
|
||||
|
||||
@@ -922,6 +922,12 @@ type TDForm = class(TDComponent)
|
||||
//r[2] := array("type":"menu","caption":"打开工程目录","onclick":thisfunction(openProjectDir));
|
||||
return r;
|
||||
end
|
||||
function CheckParent(dcomp,Pwnd);override;
|
||||
begin
|
||||
|
||||
pwnd := 0;//initializeapplication().GetApplicationWindow();;
|
||||
return 1;
|
||||
end
|
||||
function InToolBar();override;
|
||||
begin
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user