设计器

active
This commit is contained in:
JianjunLiu
2022-12-19 10:00:57 +08:00
parent 1a1052169d
commit 05ae594b93
8 changed files with 101 additions and 47 deletions
+14 -8
View File
@@ -645,12 +645,16 @@ type TVclDesigner = class(tvcform)
par := FCurrentNode.Component.Cwnd;
r := FComponentCreater.ComponentCreater(FCurrentNode,FCurrentNode.Component.Cwnd);
if not r then exit;
npar := par;
while not(npar.WsPopUp) do
begin
npar := par.parent;
end
FProjectManager.hiddeneditor(npar.BoundsRect);//此处隐藏编辑器
//////////////////////////////////////////
//npar := par;
//while not(npar.WsPopUp) do
//begin
// npar := par.parent;
//end
//FProjectManager.hiddeneditor(npar.BoundsRect);//此处隐藏编辑器
////////////////////////////////////////////////
global g_script_can_set_not_focus;
g_script_can_set_not_focus := true;
r.CreateName();
FVariableSelecter.additem(r);
BindCwndMessage(r.Cwnd);
@@ -677,6 +681,7 @@ type TVclDesigner = class(tvcform)
FCurrentNode := nil;
FTree.PopupMenu := nil;
//echo "\r\n 添加控件";
g_script_can_set_not_focus := false;
return r;
end
function setcomponentfocus(cwnd,fk); //设置获得选中
@@ -1003,8 +1008,9 @@ type TVclDesigner = class(tvcform)
wd := cp.Cwnd;
if wd.visible then
begin
wd.visible := false;
wd.visible := true;
//wd.visible := false;
//wd.visible := true;
_wapi.SetActiveWindow(wd.Handle);
end
end
end
+1 -1
View File
@@ -699,7 +699,7 @@ type TProjectView = class(TVCForm) //
FTslEditer.Show(SW_SHOWNOACTIVATE); //
_wapi.bringWindowToTop(FTslEditer.Handle);
end
function hiddeneditor(rc);
function hiddeneditor(rc);//隐藏
begin
if FTslEditer.visible then
begin
+6
View File
@@ -1073,6 +1073,12 @@ type TFTSLScriptMemo = class(TFTSLScriptcustomMemo)
begin
inherited;
end
function SetFocus();
begin
global g_script_can_set_not_focus;
if g_script_can_set_not_focus then return ;
if HandleAllocated() then _wapi.SetFocus(self.Handle);
end
end
type TPageEditerItem=class(TPageItem)
FPageOrderId; //序号有调用者使用
+5 -1
View File
@@ -306,7 +306,9 @@ type TDComponent = class()
end
function cutclick(o,e);virtual; //剪切节点
begin
deleteorcut(o,1);
global g_script_can_set_not_focus := true;
deleteorcut(o,1);
g_script_can_set_not_focus := false;
end
function pasteclick(o,e);virtual; //粘贴节点
begin
@@ -319,7 +321,9 @@ type TDComponent = class()
end
function deleteclick(o,e);virtual; //控件删除操作
begin
global g_script_can_set_not_focus := true;
deleteorcut(o,0);
g_script_can_set_not_focus := false;
end
function GetDeleteNames(nd,ns,wds);
begin