函数查找 打开的时候关闭窗口

This commit is contained in:
2025-01-23 17:49:04 +08:00
parent 3614e645b4
commit 5e04ec2088
15 changed files with 189 additions and 43 deletions
+4 -1
View File
@@ -892,7 +892,10 @@ type tcontrol = class(tcomponent)
bds:= array(0,0,w,h);
end
else
bds := UnAlignBounds;
begin
//bds := UnAlignBounds;
bds := BoundsRect;
end
case Align of
alTop:
begin
+8 -8
View File
@@ -247,9 +247,9 @@ BFC6105000000097048597300000EC300000EC301C76FA8640000010D49444154
vL := v.Left;
sw := fcursplitter.Width;
nvl := max(x-vl-sw,sw);
v.Align := alNone;
//v.Align := alNone;
v.Width := nvl;
v.Align := fcurspltype;
//v.Align := fcurspltype;
return ;
end
end
@@ -265,9 +265,9 @@ BFC6105000000097048597300000EC300000EC301C76FA8640000010D49444154
vL := v.top;
sw := fcursplitter.Height;
nvl := max(y-vl-sw,sw);
v.Align := alNone;
//v.Align := alNone;
v.Height := nvl;
v.Align := fcurspltype;
//v.Align := fcurspltype;
return ;
end
end
@@ -282,9 +282,9 @@ BFC6105000000097048597300000EC300000EC301C76FA8640000010D49444154
vl := (v.BoundsRect)[2];
sw := fcursplitter.Width;
nvl := max(vl-x-sw*1.5,sw);
v.Align := alNone;
//v.Align := alNone;
v.Width := nvl;
v.Align := fcurspltype;
//v.Align := fcurspltype;
return ;
end
end
@@ -299,9 +299,9 @@ BFC6105000000097048597300000EC300000EC301C76FA8640000010D49444154
vL := (v.BoundsRect)[3];
sw := fcursplitter.Height;
nvl := max(vl-y-sw*1.5,sw);
v.Align := alNone;
//v.Align := alNone;
v.Height := nvl;
v.Align := fcurspltype;
//v.Align := fcurspltype;
return ;
end
end
+1 -1
View File
@@ -12,7 +12,7 @@ type tcustomsplitter = class(tgraphiccontrol)
end
function paint();override;
begin
inherited;
//inherited;
r := ClientRect;
dc := Canvas;
if Border then
+10
View File
@@ -80,6 +80,16 @@ type tgraphiccontrol = class(TControl)
InvalidateRectForce();
end
end
function GetPreferredSize(w,h);override;
begin
ft := Font;
if ft then
begin
c := caption;
w := ft.Width*(max(length(c),1))+2;
h := ft.Height+3;
end
end
function InvalidateRect(rec,f);
begin
{**
+4 -4
View File
@@ -2511,10 +2511,10 @@ type TWinControl = class(tcontrol)
begin
e.Result := hit;
e.skip := true;
if (csDesigning in ComponentState) then
{if (csDesigning in ComponentState) then
begin
if al <> alNone then _send_(WM_USER,1644,1644,1);
end
end}
end
end
end
@@ -2567,7 +2567,7 @@ type TWinControl = class(tcontrol)
if e.wparam=1644 and e.lparam=1644 then
begin
//Align=alNone;
al := Align;
{al := Align;
if al in array(alLeft,alRight,alTop,alBottom) then
begin
@@ -2579,7 +2579,7 @@ type TWinControl = class(tcontrol)
Align := al;
end
end
}
end
end