From 26b74435fbf3e0a58928f74126be5738f3f067f7 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Mon, 29 Aug 2022 10:45:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 设计器 --- designer/tslvcldesigner.tsf | 37 +++++++++++++++++++++++++++++++++++-- funcext/tvclib/tcontrol.tsf | 2 +- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/designer/tslvcldesigner.tsf b/designer/tslvcldesigner.tsf index 4d9c963..293f3e4 100644 --- a/designer/tslvcldesigner.tsf +++ b/designer/tslvcldesigner.tsf @@ -1627,8 +1627,8 @@ type TVclDesigner = class(tvcform) wnd.OnDesignClick := thisfunction(ClickComponent); wnd.OnDesigndblClick := thisfunction(DBLClickComponent); wnd.OnDesignrClick := thisfunction(RClickComponent); - wnd.onmove := thisfunction(ComponentMove); - wnd.onsize := thisfunction(ComponentSize); + //wnd.onmove := thisfunction(ComponentMove); + //wnd.onsize := thisfunction(ComponentSize); //wnd.Onclose := thisfunction(CompClose); //Ö»ÊǺöÂÔ wnd.Onclose := function(o,e)begin e.skip := true; @@ -7037,6 +7037,39 @@ type TPropGrid = class(TTSLDataGrid) end end } end + function Notification(o,op);override; + begin + inherited; + if HandleAllocated() and ifarray(op) and (op["type"]="possize") and (FComponent is class(TDComponent)) and (FComponent.Cwnd = o) then + begin + dt := TSLData; + + flg := op["flag"]; + if ifarray(dt) then + begin + for i,v in mrows(dt,1) do + begin + if (flg .& 1) and v="left" then + begin + CellChanged(i,1,"value",op["data"][0]); + end + if (flg .& 2) and v="top" then + begin + CellChanged(i,1,"value",op["data"][1]); + end + if (flg .& 4) and v="width" then + begin + CellChanged(i,1,"value",op["data"][2]); + end + if (flg .& 8) and v="height" then + begin + CellChanged(i,1,"value",op["data"][3]); + end + end + return 1; + end + end + end function SetGridValue(index,d,o); begin if (FComponent is class(TDComponent)) and FComponent.Cwnd = o then diff --git a/funcext/tvclib/tcontrol.tsf b/funcext/tvclib/tcontrol.tsf index 6d5c85b..ab80f59 100644 --- a/funcext/tvclib/tcontrol.tsf +++ b/funcext/tvclib/tcontrol.tsf @@ -1395,7 +1395,7 @@ type tcontrol = class(tcomponent) obj := class(tUIglobalData).uigetdata("tuiapplication"); if obj then begin - obj.Notification(self(true),array("type":"possize","flag",rchange,"data":array(fleft,ftop,FWidth,FHeight))); + obj.Notification(self(true),array("type":"possize","flag":rchange,"data":array(fleft,ftop,FWidth,FHeight))); end //echo "\r\n note change mtoc:",caption,"===",mtoc; end