界面库

设计器
This commit is contained in:
JianjunLiu 2022-08-29 10:45:19 +08:00
parent 65ade2d828
commit 26b74435fb
2 changed files with 36 additions and 3 deletions

View File

@ -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

View File

@ -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