parent
5cc38d594c
commit
50e0c4b2f5
|
|
@ -27,14 +27,14 @@ type tcustomcontrol=class(TWinControl)
|
||||||
begin
|
begin
|
||||||
if AControl is class(tcustomsplitter) then
|
if AControl is class(tcustomsplitter) then
|
||||||
begin
|
begin
|
||||||
fhasspliter++;
|
fhassplitter++;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function ControlDeleted(AControl);override;
|
function ControlDeleted(AControl);override;
|
||||||
begin
|
begin
|
||||||
if AControl is class(tcustomsplitter) then
|
if AControl is class(tcustomsplitter) then
|
||||||
begin
|
begin
|
||||||
fhasspliter--;
|
fhassplitter--;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
public
|
public
|
||||||
|
|
@ -42,6 +42,7 @@ type tcustomcontrol=class(TWinControl)
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
includestate(FControlState,csCustomPaint);
|
includestate(FControlState,csCustomPaint);
|
||||||
|
fhassplitter := 0;
|
||||||
fsplitterwilldrag := true;
|
fsplitterwilldrag := true;
|
||||||
//FCanvas := new tcanvas();
|
//FCanvas := new tcanvas();
|
||||||
end
|
end
|
||||||
|
|
@ -75,7 +76,7 @@ type tcustomcontrol=class(TWinControl)
|
||||||
|
|
||||||
function WMLButtonDown(o,e);override;//ÍÏ×§ÊÍ·Å
|
function WMLButtonDown(o,e);override;//ÍÏ×§ÊÍ·Å
|
||||||
begin
|
begin
|
||||||
if fhasspliter<1 then return inherited;
|
if fhassplitter<1 then return inherited;
|
||||||
if csDesigning in ComponentState then exit;
|
if csDesigning in ComponentState then exit;
|
||||||
case fcurspltype of
|
case fcurspltype of
|
||||||
alLeft,alRight:
|
alLeft,alRight:
|
||||||
|
|
@ -110,7 +111,7 @@ type tcustomcontrol=class(TWinControl)
|
||||||
end
|
end
|
||||||
function WMLBUTTONUP(o,e);override;//ÍÏקʵÏÖ
|
function WMLBUTTONUP(o,e);override;//ÍÏקʵÏÖ
|
||||||
begin
|
begin
|
||||||
if fhasspliter<1 then return inherited;
|
if fhassplitter<1 then return inherited;
|
||||||
if csDesigning in ComponentState then return ;
|
if csDesigning in ComponentState then return ;
|
||||||
if fsplitterdraging then
|
if fsplitterdraging then
|
||||||
begin
|
begin
|
||||||
|
|
@ -124,11 +125,11 @@ type tcustomcontrol=class(TWinControl)
|
||||||
_wapi.clipcursor(0);
|
_wapi.clipcursor(0);
|
||||||
return ;
|
return ;
|
||||||
end
|
end
|
||||||
inherited;
|
return inherited;
|
||||||
end
|
end
|
||||||
function WMMouseMove(o,e);override; //ÒÆ¶¯
|
function WMMouseMove(o,e);override; //ÒÆ¶¯
|
||||||
begin
|
begin
|
||||||
if fhasspliter<1 then return inherited;
|
if fhassplitter<1 then return inherited;
|
||||||
if csDesigning in ComponentState then return inherited;
|
if csDesigning in ComponentState then return inherited;
|
||||||
if fsplitterdraging then
|
if fsplitterdraging then
|
||||||
begin
|
begin
|
||||||
|
|
@ -168,7 +169,7 @@ type tcustomcontrol=class(TWinControl)
|
||||||
end
|
end
|
||||||
cursor := OCR_NORMAL;
|
cursor := OCR_NORMAL;
|
||||||
end
|
end
|
||||||
inherited;
|
return inherited;
|
||||||
end
|
end
|
||||||
property OnPaint:eventhandler read FOnPaint write FOnPaint;
|
property OnPaint:eventhandler read FOnPaint write FOnPaint;
|
||||||
{**
|
{**
|
||||||
|
|
@ -333,5 +334,5 @@ BFC6105000000097048597300000EC300000EC301C76FA8640000010D49444154
|
||||||
fcursplitter;
|
fcursplitter;
|
||||||
fcursplitterid;
|
fcursplitterid;
|
||||||
fsplitercache;
|
fsplitercache;
|
||||||
fhasspliter;
|
fhassplitter;
|
||||||
end;
|
end;
|
||||||
|
|
@ -709,7 +709,7 @@ type tstrindexarray = class
|
||||||
{**
|
{**
|
||||||
@explan(说明) 删除指定下标 %%
|
@explan(说明) 删除指定下标 %%
|
||||||
**}
|
**}
|
||||||
if ifnil(idx)or ifobj(idx)then return 0;
|
if ifnil(idx) or ifobj(idx)then return 0;
|
||||||
if ifstring(idx)then
|
if ifstring(idx)then
|
||||||
begin
|
begin
|
||||||
lidx := lowercase(idx);
|
lidx := lowercase(idx);
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@ uses utslvclauxiliary,utslvclmemstruct,utslvclgdi;
|
||||||
@explan(说明) 表格控件相关 %%
|
@explan(说明) 表格控件相关 %%
|
||||||
@date(20220510)
|
@date(20220510)
|
||||||
**}
|
**}
|
||||||
type TcustomGridCtl = class(TCustomControl)
|
type TcustomGridCtl = class(TCustomControl) //自绘制表格基类
|
||||||
{**
|
{**
|
||||||
@explan(说明) 自绘制表格控件 %%
|
@explan(说明) 自绘制表格控件 %%
|
||||||
**}
|
**}
|
||||||
function Create(AOwner);override;
|
function Create(AOwner);override; //构造
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
FLocalX := 0;
|
FLocalX := 0;
|
||||||
|
|
@ -36,7 +36,7 @@ type TcustomGridCtl = class(TCustomControl)
|
||||||
FVariableRows := false;
|
FVariableRows := false;
|
||||||
FSI := new TScrollinfo();
|
FSI := new TScrollinfo();
|
||||||
end
|
end
|
||||||
function GetItemRect(i);virtual;
|
function GetItemRect(i);virtual; //根据行号获得其区域
|
||||||
begin
|
begin
|
||||||
{**
|
{**
|
||||||
@explan(说明) 获得行的区域 %%
|
@explan(说明) 获得行的区域 %%
|
||||||
|
|
@ -55,7 +55,7 @@ type TcustomGridCtl = class(TCustomControl)
|
||||||
r[2]:= basex;
|
r[2]:= basex;
|
||||||
return r;
|
return r;
|
||||||
end
|
end
|
||||||
function GetItemStartY(i);virtual;
|
function GetItemStartY(i);virtual; //获得行的top
|
||||||
begin
|
begin
|
||||||
{**
|
{**
|
||||||
@explan(说明) 获得行的区域范围 %%
|
@explan(说明) 获得行的区域范围 %%
|
||||||
|
|
@ -82,7 +82,7 @@ type TcustomGridCtl = class(TCustomControl)
|
||||||
yb -= yp * itv;
|
yb -= yp * itv;
|
||||||
return yb;
|
return yb;
|
||||||
end
|
end
|
||||||
function GetItemYBound(i);virtual;
|
function GetItemYBound(i);virtual; //获得行的
|
||||||
begin
|
begin
|
||||||
{**
|
{**
|
||||||
@explan(说明) 获得行的区域范围 %%
|
@explan(说明) 获得行的区域范围 %%
|
||||||
|
|
@ -1188,7 +1188,7 @@ type TcustomGridCtl = class(TCustomControl)
|
||||||
FCurrentSizePos;
|
FCurrentSizePos;
|
||||||
end
|
end
|
||||||
implementation
|
implementation
|
||||||
type TCanvsRgnClipAutoSave=class
|
type TCanvsRgnClipAutoSave=class()//canvas 裁剪
|
||||||
{**
|
{**
|
||||||
@expan(说明) 裁剪canvas区域,销毁时还原 %%
|
@expan(说明) 裁剪canvas区域,销毁时还原 %%
|
||||||
**}
|
**}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue