设计器
优化细节
This commit is contained in:
@@ -592,7 +592,11 @@ type TVclDesigner = class(tvcform)
|
||||
l := O.left;
|
||||
r := o.top;
|
||||
if not FPropGrid.SetGridValue("left",l,O) then o.setpublish("left",l);
|
||||
if not FPropGrid.SetGridValue("top",r,O) then o.setpublish("top",r);
|
||||
if not FPropGrid.SetGridValue("top",r,O) then o.setpublish("top",r);
|
||||
if o.WsPopUp then return ;
|
||||
p := o.parent;
|
||||
if p then
|
||||
p.Invalidaterect(nil,0);
|
||||
end
|
||||
function ComponentSize(o,e);//大小改变
|
||||
begin
|
||||
@@ -603,7 +607,10 @@ type TVclDesigner = class(tvcform)
|
||||
h := o.height;
|
||||
if not FPropGrid.SetGridValue("width",w,O) then o.setpublish("width",w);
|
||||
if not FPropGrid.SetGridValue("height",h,O) then o.setpublish("height",h);
|
||||
|
||||
if o.WsPopUp then return ;
|
||||
p := o.parent;
|
||||
if p then
|
||||
p.Invalidaterect(nil,0);
|
||||
//setcomponentfocus(o,false);
|
||||
end
|
||||
function DesignerClose(o,e) //控件窗口关闭
|
||||
@@ -650,7 +657,7 @@ type TVclDesigner = class(tvcform)
|
||||
if FComponentCreater and FCurrentNode and FCurrentClikPos then
|
||||
begin
|
||||
par := FCurrentNode.Component.Cwnd;
|
||||
r := FComponentCreater.ComponentCreater(FCurrentNode,FCurrentNode.Component.Cwnd);
|
||||
r := FComponentCreater.ComponentCreater(FCurrentNode,par);
|
||||
if not r then exit;
|
||||
//////////////////////////////////////////
|
||||
//npar := par;
|
||||
@@ -814,11 +821,32 @@ type TVclDesigner = class(tvcform)
|
||||
if e then e.skip := true;
|
||||
end
|
||||
private //节点点击
|
||||
factivatedonging;
|
||||
function windowactive(o,e);
|
||||
begin
|
||||
|
||||
if e.wparam then
|
||||
begin
|
||||
o1 := o;
|
||||
if FCurrentNode then
|
||||
begin
|
||||
wd := FCurrentNode.Component.Cwnd;
|
||||
wd1 := wd;
|
||||
while wd1 do
|
||||
begin
|
||||
if wd1 = o then
|
||||
begin
|
||||
factivatedonging := true;
|
||||
ClickComponent(wd,e);
|
||||
factivatedonging := false;
|
||||
return ;
|
||||
end
|
||||
wd1 := wd1.parent;
|
||||
end
|
||||
end
|
||||
factivatedonging := true;
|
||||
ClickComponent(o,e);
|
||||
factivatedonging := false;
|
||||
end
|
||||
end
|
||||
function ClickComponent(o,e); //点击组件选择
|
||||
@@ -836,12 +864,13 @@ type TVclDesigner = class(tvcform)
|
||||
end
|
||||
if FCurrentNode<> nd then
|
||||
begin
|
||||
wd := o;//nd.Component.Cwnd;
|
||||
//wd := o;//nd.Component.Cwnd;
|
||||
//if wd is class(TWincontrol) then _wapi.BringWindowToTop(wd.Handle);
|
||||
tr.SetSel(nd);
|
||||
TreeNodeSelected(nd);
|
||||
end;
|
||||
setcomponentfocus(o,true);
|
||||
if factivatedonging then return ;
|
||||
if FComponentCreater and FCurrentNode then
|
||||
begin
|
||||
//SetSysParam("cpos_screan",array(e.lolparam,e.hilparam));
|
||||
@@ -849,9 +878,10 @@ type TVclDesigner = class(tvcform)
|
||||
begin
|
||||
FCurrentNode := (tr.RootItem.items)[0];
|
||||
if not FCurrentNode then return FComponentCreater := nil;
|
||||
O1 := FCurrentNode.Component.Cwnd;
|
||||
if not o1 then return FComponentCreater := nil;
|
||||
end else o1 := o;
|
||||
//O1 := FCurrentNode.Component.Cwnd;
|
||||
//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]);
|
||||
|
||||
@@ -2515,7 +2515,7 @@ type TEditer=class(TCustomcontrol) //
|
||||
rd := FPageEditerMenus["查看"];
|
||||
if rd then
|
||||
begin
|
||||
mtic;
|
||||
//mtic;
|
||||
it := GetCurrentEditer();
|
||||
s := it.CanJump();
|
||||
if s then
|
||||
@@ -2604,6 +2604,8 @@ type TEditer=class(TCustomcontrol) //
|
||||
it.FEditer.TabChar := FTabChar;
|
||||
it.FEditer.PageItem := it;
|
||||
it.FEditer.hgcolor := Fhightercolor;
|
||||
tf := FTslCacheDir+"newfile"+ioFileseparator()+"new";
|
||||
if pos(tf,n)=1 then it.fisnewfile := true;
|
||||
it.FEditer.QuckKeys := Thisfunction(EditerQuckKeys);
|
||||
it.FEditer.OnTextSetFocus := function(o,e)
|
||||
begin
|
||||
|
||||
@@ -1280,11 +1280,17 @@ type TTslDebuga=class(TCustomControl)
|
||||
end
|
||||
"dbgeval": //执行
|
||||
begin
|
||||
if FConnectchannel and p and ifstring(p)then
|
||||
if FConnectchannel then
|
||||
begin
|
||||
getvalewnd("ans");
|
||||
dbgeval(FConnectchannel,p);
|
||||
end
|
||||
if p and ifstring(p) then
|
||||
begin
|
||||
getvalewnd("ans");
|
||||
dbgeval(FConnectchannel,p);
|
||||
end
|
||||
end else
|
||||
begin
|
||||
FShowText.Text +="非调试状态!";
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user