parent
85d2f31e8d
commit
b64606ef50
|
|
@ -1394,7 +1394,9 @@ type TImageListWindow = class(TDVirutalWindow)
|
|||
function Create(AOwner);override;
|
||||
begin
|
||||
inherited;
|
||||
WindowFileds := array("left","top","height","width");
|
||||
width := 30;
|
||||
height := 30;
|
||||
WindowFileds := array("left","top");
|
||||
BindComp := new TControlImageList(self);;
|
||||
end
|
||||
function bitmapinfo();override;
|
||||
|
|
|
|||
|
|
@ -1371,7 +1371,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
end
|
||||
function DoCaretPosChanged();virtual;//caretλÖøıä
|
||||
begin
|
||||
if foncaretposchanged and fcaretcreated then
|
||||
if foncaretposchanged and ( fcaretcreated or ReadOnly) then
|
||||
begin
|
||||
e := new tuieventbase(0,0,0,0);
|
||||
CallMessgeFunction(foncaretposchanged,self(true),e);
|
||||
|
|
@ -1386,8 +1386,8 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
begin
|
||||
fLines.text := "";
|
||||
FCaretX := FCaretY := 1;
|
||||
FSelBegin := array(1,1);
|
||||
FSelEnd := array(1,1);
|
||||
fBlockBegin := array(1,1);
|
||||
fBlockEnd := array(1,1);
|
||||
ClearUndo();
|
||||
memtextchanged(array(1,1));
|
||||
end
|
||||
|
|
@ -2193,6 +2193,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
if ifstring(s)and fCaretY>0 and fCaretY <= fLines.Length()then
|
||||
begin
|
||||
fLines.SetValueByIndex(fCaretY-1,s);
|
||||
memtextchanged(array(fcarety,1));
|
||||
//InvalidateLines(fCaretY-1,fCaretY-1);
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -896,16 +896,7 @@ type tnumindexarray = Class() //ջģ
|
|||
{**
|
||||
@explan(说明) 在末尾追加元素,参数个数不定 %%
|
||||
**}
|
||||
r := fdlength;
|
||||
r1 := r;
|
||||
for i := 0 to ParamCount-1 do
|
||||
begin
|
||||
FData[r]:= Params[i+1];
|
||||
r++;
|
||||
end
|
||||
fdlength := r;
|
||||
if r1 <> r then LengthChanged(r1-r);
|
||||
return r;
|
||||
return pushs(params);
|
||||
end
|
||||
function Pop();
|
||||
begin
|
||||
|
|
@ -961,33 +952,8 @@ type tnumindexarray = Class() //ջģ
|
|||
end
|
||||
function splice({startid,sellength,value1,valfue2,....});
|
||||
begin
|
||||
{**
|
||||
@explan(说明) 替换元素,第一个参数为开始位置,第二个为替换的个数,以后的参数为用来替换的值,返回被替换的值%%
|
||||
**}
|
||||
p := params;
|
||||
st := p[0];
|
||||
if not(st>=0) then st := 0;
|
||||
sl := p[1];
|
||||
sl := ifnil(sl)?inf:sl;
|
||||
sl := (sl>=0)?sl:0;
|
||||
len := fdlength;
|
||||
st := st<0?0:st;
|
||||
st := st >= len?(len):st;
|
||||
et := st+sl;
|
||||
et := et >= len?(len):et;
|
||||
r := array();
|
||||
{idx := 0;
|
||||
for i := st to et-1 do
|
||||
begin
|
||||
r[idx++]:= FData[i];
|
||||
end }
|
||||
r := FData[st:(et-1)];
|
||||
r1 := FData[0:st-1];
|
||||
r2 := FData[et:len-1];
|
||||
FData := r1 union p[2:] union r2;
|
||||
fdlength := ::length(FData);
|
||||
if len <> fdlength then LengthChanged(fdlength-len);
|
||||
return r;
|
||||
return splices(p[0],p[1],p[2:]);
|
||||
end
|
||||
function shift();
|
||||
begin
|
||||
|
|
@ -1009,14 +975,7 @@ type tnumindexarray = Class() //ջģ
|
|||
{**
|
||||
@explan(说明) 在数据头部加入元素,个数待定 %%
|
||||
**}
|
||||
p := Params;
|
||||
if p then
|
||||
begin
|
||||
FData := p union FData;
|
||||
fdlength := ::length(FData);
|
||||
LengthChanged(1);
|
||||
end
|
||||
return fdlength;
|
||||
return unshifts(params);
|
||||
end
|
||||
function swap(i,j);
|
||||
begin
|
||||
|
|
@ -1036,16 +995,58 @@ type tnumindexarray = Class() //ջģ
|
|||
end
|
||||
function pushs(vs);
|
||||
begin
|
||||
return callinarray(thisfunction(push),vs);
|
||||
if not(vs) and length(vs) then return r;
|
||||
r := fdlength;
|
||||
r1 := r;
|
||||
for i := 0 to length(vs)-1 do
|
||||
begin
|
||||
FData[r]:= vs[i];
|
||||
r++;
|
||||
end
|
||||
fdlength := r;
|
||||
if r1 <> r then LengthChanged(r1-r);
|
||||
return r;
|
||||
end
|
||||
function unshifts(vs);
|
||||
begin
|
||||
return callinarray(thisfunction(unshift),vs);
|
||||
begin
|
||||
if ifarray(vs) and vs then
|
||||
begin
|
||||
FData := vs union FData;
|
||||
fdlength := ::length(FData);
|
||||
LengthChanged(1);
|
||||
end
|
||||
return fdlength;
|
||||
end
|
||||
function splices(startid,sellength,vs);
|
||||
begin
|
||||
if ifarray(vs)then return callinarray(thisfunction(splice),array(startid,sellength) union vs);
|
||||
return array();
|
||||
{**
|
||||
@explan(说明) 替换元素,第一个参数为开始位置,第二个为替换的个数,以后的参数为用来替换的值,返回被替换的值%%
|
||||
**}
|
||||
st := startid;
|
||||
if not(st>=0) then st := 0;
|
||||
sl := sellength;
|
||||
sl := ifnil(sl)?inf:sl;
|
||||
sl := (sl>=0)?sl:0;
|
||||
len := fdlength;
|
||||
st := st<0?0:st;
|
||||
st := st >= len?(len):st;
|
||||
et := st+sl;
|
||||
et := et >= len?(len):et;
|
||||
r := array();
|
||||
r := FData[st:(et-1)];
|
||||
r1 := FData[0:st-1];
|
||||
r2 := FData[et:len-1];
|
||||
if ifarray(vs) and vs then
|
||||
begin
|
||||
FData := r1 union vs union r2;
|
||||
|
||||
end else
|
||||
begin
|
||||
FData := r1 union r2;
|
||||
end
|
||||
fdlength := ::length(FData);
|
||||
if len <> fdlength then LengthChanged(fdlength-len);
|
||||
return r;
|
||||
end
|
||||
function LengthChanged(n);virtual;
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -2073,8 +2073,8 @@ type TCustomImageList=class(tcomponent)
|
|||
property Handle read HandleNeeded write SetHandle;
|
||||
property AutoDestroy read FAutoDestroy write FAutoDestroy;
|
||||
property ImageCount read FimageCount;
|
||||
property Height:integer read FHeight write Setheight;
|
||||
property Width:integer read FWidth write SetWidth;
|
||||
property Height read FHeight write Setheight;
|
||||
property Width read FWidth write SetWidth;
|
||||
property imgHeight:integer read FHeight write Setheight;
|
||||
property imgWidth:integer read FWidth write SetWidth;
|
||||
property OnChange read FOnChange write FOnChange;
|
||||
|
|
|
|||
Loading…
Reference in New Issue