parent
505a537c09
commit
e8ef5109ef
|
|
@ -1153,14 +1153,7 @@ type tcontrol = class(tcomponent)
|
|||
@explan(说明) 资源回收,子类请override该方法然后在destroy中调用 %%
|
||||
**}
|
||||
FFont := nil;
|
||||
FMessagehandle := array();
|
||||
{while true do
|
||||
begin
|
||||
ci := FControls.Count;
|
||||
if ci<1 then break;
|
||||
cvi := FControls[ci-1];
|
||||
cvi.SetParent(nil);
|
||||
end }
|
||||
FMessagehandle := array();
|
||||
FSIDC.deleteid(FID);
|
||||
SetParent(nil);
|
||||
FOnClick := nil; //点击
|
||||
|
|
|
|||
|
|
@ -2215,10 +2215,6 @@ type TTreeNode=class(TTreeCtlNode)
|
|||
begin
|
||||
inherited;
|
||||
end
|
||||
function Destroy();override;
|
||||
begin
|
||||
inherited;
|
||||
end
|
||||
function moveup();virtual;
|
||||
begin
|
||||
{**
|
||||
|
|
@ -2229,8 +2225,13 @@ type TTreeNode=class(TTreeCtlNode)
|
|||
if not bf then return false;
|
||||
ndp := parent;
|
||||
nd := self(true);
|
||||
if ndp then
|
||||
if ndp then
|
||||
begin
|
||||
ow := Owner;
|
||||
if ow then //Ëø¶¨Ñ¡Ôñ¸Ä±ä
|
||||
begin
|
||||
lk := ow.ExecuteCommand("addlocked",0);
|
||||
end
|
||||
ndp.deletenode(nd);
|
||||
ndp.insertnode(nd,bf);
|
||||
return true;
|
||||
|
|
@ -2247,6 +2248,11 @@ type TTreeNode=class(TTreeCtlNode)
|
|||
ndp := parent;
|
||||
if ndp then
|
||||
begin
|
||||
ow := Owner;
|
||||
if ow then //Ëø¶¨Ñ¡Ôñ¸Ä±ä
|
||||
begin
|
||||
lk := ow.ExecuteCommand("addlocked",0);
|
||||
end
|
||||
nd := self(true);
|
||||
ndp.deletenode(nd);
|
||||
ndp.insertnode(nd,ndp.indexof(bf)+1);
|
||||
|
|
|
|||
|
|
@ -905,7 +905,7 @@ type TWinControl = class(tcontrol)
|
|||
FHandle := nil;
|
||||
for i := 0 to FControls.count-1 do
|
||||
begin
|
||||
item := FControls.geti(i);
|
||||
item := FControls[i];
|
||||
if(item is class(TWinControl))and item.WsPopUp then
|
||||
begin
|
||||
item.DestroyHandle();
|
||||
|
|
@ -1782,7 +1782,6 @@ type TWinControl = class(tcontrol)
|
|||
begin
|
||||
FUpDateCount := 0;
|
||||
FTabStop := false;
|
||||
FControls := new TFpList();
|
||||
FBorderStyle := bsNone;
|
||||
//FTRACKMOUSEEVENT := NEW TTRACKMOUSEEVENT();
|
||||
FWsPopUp := false;
|
||||
|
|
@ -1888,7 +1887,7 @@ type TWinControl = class(tcontrol)
|
|||
begin
|
||||
for i := 0 to FControls.count-1 do
|
||||
begin
|
||||
item := FControls.geti(i);
|
||||
item := FControls[i];
|
||||
if(item is class(TWinControl))then
|
||||
begin
|
||||
item.HandleNeeded();
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ type tarray1dlk=class //
|
|||
**}
|
||||
if j>_len-1 then j := _len-1;
|
||||
if j<0 then j := 0;
|
||||
if i=j or(i<0 and i>_len)then exit;
|
||||
if i=j or(i<0 or i>_len)then exit; //修改
|
||||
sl := createserial(i,j);
|
||||
for ii := 0 to length(sl)-2 do
|
||||
begin
|
||||
|
|
@ -1045,6 +1045,59 @@ type tnumindexarray = Class() //ջģ
|
|||
@param(Data)(array) 数据 %%
|
||||
**}
|
||||
end
|
||||
type tnumindexarrayex = class(tnumindexarray)
|
||||
{**
|
||||
@explan(说明) 扩展模拟数组 %%
|
||||
**}
|
||||
function create();
|
||||
begin
|
||||
inherited;
|
||||
end
|
||||
function Deli(idx);
|
||||
begin
|
||||
r := splice(idx,1);
|
||||
return r?true:false;
|
||||
end
|
||||
function geti(i);
|
||||
begin
|
||||
return GetValueByIndex(i);
|
||||
end
|
||||
function InsertBefor(it,idx);
|
||||
begin
|
||||
splice(idx,0,it);
|
||||
end
|
||||
function clean();
|
||||
begin
|
||||
splice(nil,nil);
|
||||
end
|
||||
function setorder(i,j);
|
||||
begin
|
||||
{**
|
||||
@explan(说明) 设置元素位置 %%
|
||||
@param(i)(integer)原始位置 %%
|
||||
@param(j)(integer) 移动后的位置
|
||||
**}
|
||||
len := count-1;
|
||||
if j>len then j := len;
|
||||
if j<0 then j := 0;
|
||||
if i=j or(i<0 or i>len)then exit;
|
||||
d := splice(i,1);
|
||||
splice(j,0,d[0]);
|
||||
end
|
||||
function append(v);
|
||||
begin
|
||||
Push(v);
|
||||
end
|
||||
function add(v) ;
|
||||
begin
|
||||
Push(v);
|
||||
end
|
||||
function Remove(v);
|
||||
begin
|
||||
return deli(indexof(v));
|
||||
end
|
||||
property count read length;
|
||||
end
|
||||
//ifdef newgetop
|
||||
type trefarray = class() //数组成员引用模拟
|
||||
function create(d,bidxs); //构造函数
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ type ttreelistwnd = class(TCustomScrollControl)
|
|||
begin
|
||||
inherited;
|
||||
FHashItems := array();
|
||||
FItems := new TFpList();
|
||||
FItems := new tnumindexarrayex();
|
||||
FColWidth := 10;
|
||||
FColCount := 0;
|
||||
FItemHeight := 25;
|
||||
|
|
@ -699,7 +699,7 @@ type TcustomTreeCtlNode = class(tsluibase) //
|
|||
FExpandWidth := 12;
|
||||
FBasePos := 10;
|
||||
FHierarchyWidth := 20;
|
||||
FItems := new TFpList(); //子项
|
||||
FItems := new tnumindexarrayex(); //子项
|
||||
FHierarchy :=-1;
|
||||
FEexpanded := false;
|
||||
FChecked := false;
|
||||
|
|
@ -1355,7 +1355,7 @@ type TcustomTreeCtlNode = class(tsluibase) //
|
|||
FHandle;
|
||||
FWidth;
|
||||
FOwner;
|
||||
|
||||
///////////节点成员
|
||||
FVisible;
|
||||
FDirtype;
|
||||
FImgId;
|
||||
|
|
@ -1372,12 +1372,7 @@ type TcustomTreeCtlNode = class(tsluibase) //
|
|||
private //ÆÕͨÊôÐÔÉèÖÃ
|
||||
function initnodehandle();
|
||||
begin
|
||||
hd := new THandleClass();
|
||||
try
|
||||
FHandle := inttostr(int64(hd)); ////当前句柄唯一标识
|
||||
except
|
||||
FHandle := inttostr(gettslvariableptr(hd));
|
||||
end;
|
||||
FHandle := inttostr(int64(new THandleClass()));
|
||||
end
|
||||
function SetWidth(w);virtual;
|
||||
begin
|
||||
|
|
@ -1536,6 +1531,10 @@ type TcustomTreeCtl = class(ttreelistwnd)
|
|||
if FPaintArray then return FPaintArray[pm];
|
||||
return 0;
|
||||
end
|
||||
"addlocked":
|
||||
begin
|
||||
return new tcountlocker(fcountlocker);
|
||||
end
|
||||
"emptynodeexpanding":
|
||||
begin
|
||||
if HandleAllocated()then
|
||||
|
|
|
|||
Loading…
Reference in New Issue