设计器
优化
This commit is contained in:
@@ -645,6 +645,12 @@ 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);//此处隐藏编辑器
|
||||
r.CreateName();
|
||||
FVariableSelecter.additem(r);
|
||||
BindCwndMessage(r.Cwnd);
|
||||
@@ -830,19 +836,21 @@ type TVclDesigner = class(tvcform)
|
||||
if FComponentCreater is class(TDRootComponent) then
|
||||
begin
|
||||
FCurrentNode := (tr.RootItem.items)[0];
|
||||
if not FCurrentNode then exit;
|
||||
if not FCurrentNode then return FComponentCreater := nil;
|
||||
O1 := FCurrentNode.Component.Cwnd;
|
||||
if not o1 then exit;
|
||||
if not o1 then return FComponentCreater := nil;
|
||||
end else o1 := o;
|
||||
xy := array(0,0);
|
||||
_wapi.GetCursorPos(xy);
|
||||
FCurrentClikPos := o.ScreenToClient(xy[0],xy[1]);
|
||||
//FCurrentClikPos := array(e.lolparam,e.hilparam);//o1.screentoclient(e.lolparam,e.hilparam);
|
||||
r := CreateComponent();
|
||||
FComponentCreater := nil;
|
||||
if not r then return MessageBoxA("控件放置位置不兼容!","提示",0,self);
|
||||
o1 := r.Cwnd;
|
||||
o1.setpublish("left",o1.left,nil);
|
||||
o1.setpublish("top",o1.top,nil);
|
||||
|
||||
end
|
||||
return ;
|
||||
end
|
||||
|
||||
@@ -699,6 +699,17 @@ type TProjectView = class(TVCForm) //
|
||||
FTslEditer.Show(SW_SHOWNOACTIVATE); //
|
||||
_wapi.bringWindowToTop(FTslEditer.Handle);
|
||||
end
|
||||
function hiddeneditor(rc);
|
||||
begin
|
||||
if FTslEditer.visible then
|
||||
begin
|
||||
if ifarray(rc) then
|
||||
begin
|
||||
if not(intersectrect(rc,FTslEditer.BoundsRect)) then return;
|
||||
end
|
||||
FTslEditer.visible := false;
|
||||
end
|
||||
end
|
||||
function ShowCurrentFormCode();
|
||||
begin
|
||||
if FCurrentOpend then r := FCurrentOpend.gettsfname();
|
||||
|
||||
Reference in New Issue
Block a user