更新编辑器
This commit is contained in:
@@ -39,8 +39,10 @@ type t_children_sizer = class()
|
||||
dh := (bds[3]-bds[1])-(cls[3]-cls[1]);
|
||||
bds[2] := bds[0]+w+dw;
|
||||
bds[3] := bds[1]+h+dh;
|
||||
fowner.BoundsRect := bds;
|
||||
fowner.BoundsRect := bds;
|
||||
end
|
||||
p := fowner.parent;
|
||||
if p and p.autosize then p.AdjustSize();//处理传到
|
||||
fautosizing := false;
|
||||
end
|
||||
function getsizerinfo();
|
||||
|
||||
@@ -1016,8 +1016,8 @@ type tcontrol = class(tcomponent)
|
||||
if (o is class(TWinControl)) and o.WsPopUp then return ;
|
||||
if (Align=alNone) then
|
||||
begin
|
||||
p := Parent ;
|
||||
if p and p.childsizing.layout>0 then return p.AdjustSize();
|
||||
//p := Parent ;
|
||||
//if p and p.childsizing.layout>0 then return p.AdjustSize();
|
||||
AdjustSize();
|
||||
end
|
||||
end
|
||||
@@ -1029,8 +1029,8 @@ type tcontrol = class(tcomponent)
|
||||
if not NoRecycled() then return ;
|
||||
CallMessgeFunction(OnSize,o,e);
|
||||
DoWMSIZE(o,e);
|
||||
p := Parent ;
|
||||
if p and p.childsizing.layout>0 then return p.AdjustSize();
|
||||
//p := Parent ;
|
||||
//if p and p.childsizing.layout>0 then return p.AdjustSize();
|
||||
AdjustSize();
|
||||
end
|
||||
function CMCursorChanged(o,e):CM_CURSORCHANGED;virtual;
|
||||
|
||||
@@ -2597,7 +2597,7 @@ type TWinControl = class(tcontrol)
|
||||
begin
|
||||
return ;
|
||||
end
|
||||
cs := childsizing;
|
||||
cs := fchildsizing;
|
||||
if cs and cs.layout>0 then return cs.AdjustSize();
|
||||
if autosize then
|
||||
begin
|
||||
@@ -2682,8 +2682,8 @@ type TWinControl = class(tcontrol)
|
||||
@explan(说明) 控件对齐 %%
|
||||
**}
|
||||
if not HandleAllocated()then exit;
|
||||
cs := childsizing;
|
||||
if cs and cs.layout>0 then return ;
|
||||
cs := fchildsizing;
|
||||
if cs and cs.layout>0 then return;
|
||||
if not ifarray(rect)then
|
||||
begin
|
||||
rect := ClientRect;
|
||||
@@ -2710,7 +2710,7 @@ type TWinControl = class(tcontrol)
|
||||
@explan(说明) 控件锚定调整 %%
|
||||
**}
|
||||
if not HandleAllocated()then exit;
|
||||
cs := childsizing;
|
||||
cs := fchildsizing;
|
||||
if cs and cs.layout>0 then return ;
|
||||
e := new TMANCHOR(CN_ANCHOR,0,0,0);
|
||||
c := ClientRect;
|
||||
|
||||
@@ -4179,8 +4179,10 @@ type TcustomListBox=class(TCustomListBoxbase)
|
||||
begin
|
||||
if h>0 and h<>FListitemheigt then
|
||||
begin
|
||||
dy := GetYScrollDelta();
|
||||
FListitemheigt := integer(h);
|
||||
if FOwnerDraw then
|
||||
dy2 := GetYScrollDelta();
|
||||
if dy<>dy2 then
|
||||
begin
|
||||
doControlALign();
|
||||
InvalidateRect(nil,false);
|
||||
@@ -4194,7 +4196,7 @@ type TcustomListBox=class(TCustomListBoxbase)
|
||||
fselbkcolor := v;
|
||||
end
|
||||
end
|
||||
function SetItemCount(n);
|
||||
function SetItemCount(n); //自绘制才能设置项目
|
||||
begin
|
||||
if fownerdraw and (n>=0) and ItemCount<>n then
|
||||
begin
|
||||
@@ -4208,10 +4210,15 @@ type TcustomListBox=class(TCustomListBoxbase)
|
||||
if FOwnerDraw<>nv then
|
||||
begin
|
||||
FOwnerDraw := nv;
|
||||
if not(FListitemheigt>0) then
|
||||
begin
|
||||
FListitemheigt := font.Height+4;
|
||||
end
|
||||
dy := GetYScrollDelta();
|
||||
ft := Font;
|
||||
if ft then FListitemheigt := font.Height+4;
|
||||
dy2 := GetYScrollDelta();
|
||||
if dy1<>dy2 then //改变
|
||||
begin
|
||||
doControlALign();
|
||||
InvalidateRect(nil,false);
|
||||
end
|
||||
end
|
||||
end
|
||||
function PaintIdxBkg(idx,rc,cvs);
|
||||
|
||||
@@ -2932,7 +2932,16 @@ type tg_text = class(tg_base)
|
||||
if (visible<>tgc_on) then return ;
|
||||
if not fdata then return ;
|
||||
if not zoom_to_xyz(fdata[0],fdata[1],fdata[2],x,y) then return ;
|
||||
if clip_state=tgc_on then cvs.axesclip();
|
||||
if clip_state=tgc_on then
|
||||
begin
|
||||
bx := axes.zoom_box;
|
||||
vj := fdata;
|
||||
if vj[0]<bx[0,0] or vj[1]<bx[1,0] or vj[2]<bx[2,0] or vj[0]>bx[0,1] or vj[1]>bx[1,1] or vj[2]>bx[2,1] then
|
||||
begin
|
||||
return ;
|
||||
end
|
||||
cvs.axesclip();
|
||||
end
|
||||
else cvs.axesunclip();
|
||||
get_text_size(w,h,hi);
|
||||
set_lineinfo_to_canvas(cvs);
|
||||
@@ -3222,7 +3231,16 @@ type tg_tips = class(tg_base) //
|
||||
ss := get_text();
|
||||
if not ss then return ;
|
||||
if not(f_ps and ifnumber(f_ps[0]) and ifnumber(f_ps[1])) then return ;
|
||||
if clip_state=tgc_on then cvs.axesclip();
|
||||
if clip_state=tgc_on then //迂回处理
|
||||
begin
|
||||
bx := axes.zoom_box;
|
||||
vj := d;
|
||||
if vj[0]<bx[0,0] or vj[1]<bx[1,0] or vj[2]<bx[2,0] or vj[0]>bx[0,1] or vj[1]>bx[1,1] or vj[2]>bx[2,1] then
|
||||
begin
|
||||
return ;
|
||||
end
|
||||
cvs.axesclip();
|
||||
end
|
||||
else cvs.axesunclip();
|
||||
ws := 0;
|
||||
hs := array();
|
||||
|
||||
Reference in New Issue
Block a user