界面库

设计器控件复制,剪切,粘贴,以及优化 coolbar
This commit is contained in:
JianjunLiu
2022-09-20 17:01:48 +08:00
parent ab4811d834
commit 3b9ac6f107
3 changed files with 162 additions and 45 deletions
+8 -2
View File
@@ -538,7 +538,7 @@ public
begin
return FChangedProperties[n];
end
function GetChangedPublish();virtual;
function GetChangedPublish(f);virtual;
begin
{**
@explan(说明)获取修改过的publish,设计器使用 %%
@@ -555,7 +555,13 @@ public
otype := GetComponentPropertyType(vit);//GetPropertyType(vit);
if vi["write"]and otype then
begin
r[n]:= otype.FormatTMF(vv);
if f=2 then
begin
r[n] := vv;
end else
begin
r[n]:= otype.FormatTMF(vv);
end
end
end
return r;
+12 -4
View File
@@ -32,6 +32,7 @@ type tcustomcoolbar=class(tcustomcontrol)
begin
r := inherited;
if class(tflag).haslocker then return r;
if (o is class(TWinControl)) and o.WsPopUp then return r;
if HandleAllocated() and ifarray(op) and (op["type"]="possize") then //位置大小发送变化
begin
ctls := controls;
@@ -188,8 +189,9 @@ type tcustomcoolbar=class(tcustomcontrol)
bss := array();
for j,bsi in v do
begin
ctl := bsi.fctl;
if ctl.Visible then
ctl := bsi.fctl;
if ctl.Visible and not(ctl is class(TWinControl) and ctl.WsPopUp) then
begin
bss[length(bss)]:= bsi;
drc := array(x,y,x+mwid,y+rhs[i]);
@@ -558,11 +560,17 @@ type tcoolbarlines = class() //
h := 0;
for j,vj in v do
begin
if vj["visible"] then
h := max(h,vj["height"]);
if vj["visible"] and not(vj["wspopup"]) then
begin
h := max(h,vj["height"]);
end
end
r[i] := h;// max(20,h);
end
if (csDesigning in ComponentState) and (length(r)=1 and r[0]<2) then
begin
r[0] := 25;
end
return r;
end
function EnabledChild(f); //enable