界面库

分割控件问题修正
This commit is contained in:
JianjunLiu 2022-10-14 14:35:50 +08:00
parent 5cc38d594c
commit 50e0c4b2f5
3 changed files with 16 additions and 15 deletions

View File

@ -27,14 +27,14 @@ type tcustomcontrol=class(TWinControl)
begin
if AControl is class(tcustomsplitter) then
begin
fhasspliter++;
fhassplitter++;
end
end
function ControlDeleted(AControl);override;
begin
if AControl is class(tcustomsplitter) then
begin
fhasspliter--;
fhassplitter--;
end
end
public
@ -42,6 +42,7 @@ type tcustomcontrol=class(TWinControl)
begin
inherited;
includestate(FControlState,csCustomPaint);
fhassplitter := 0;
fsplitterwilldrag := true;
//FCanvas := new tcanvas();
end
@ -75,7 +76,7 @@ type tcustomcontrol=class(TWinControl)
function WMLButtonDown(o,e);override;//ÍÏ×§ÊÍ·Å
begin
if fhasspliter<1 then return inherited;
if fhassplitter<1 then return inherited;
if csDesigning in ComponentState then exit;
case fcurspltype of
alLeft,alRight:
@ -110,7 +111,7 @@ type tcustomcontrol=class(TWinControl)
end
function WMLBUTTONUP(o,e);override;//ÍÏקʵÏÖ
begin
if fhasspliter<1 then return inherited;
if fhassplitter<1 then return inherited;
if csDesigning in ComponentState then return ;
if fsplitterdraging then
begin
@ -124,11 +125,11 @@ type tcustomcontrol=class(TWinControl)
_wapi.clipcursor(0);
return ;
end
inherited;
return inherited;
end
function WMMouseMove(o,e);override; //ÒÆ¶¯
begin
if fhasspliter<1 then return inherited;
if fhassplitter<1 then return inherited;
if csDesigning in ComponentState then return inherited;
if fsplitterdraging then
begin
@ -168,7 +169,7 @@ type tcustomcontrol=class(TWinControl)
end
cursor := OCR_NORMAL;
end
inherited;
return inherited;
end
property OnPaint:eventhandler read FOnPaint write FOnPaint;
{**
@ -333,5 +334,5 @@ BFC6105000000097048597300000EC300000EC301C76FA8640000010D49444154
fcursplitter;
fcursplitterid;
fsplitercache;
fhasspliter;
fhassplitter;
end;

View File

@ -709,7 +709,7 @@ type tstrindexarray = class
{**
@explan(说明) 删除指定下标 %%
**}
if ifnil(idx)or ifobj(idx)then return 0;
if ifnil(idx) or ifobj(idx)then return 0;
if ifstring(idx)then
begin
lidx := lowercase(idx);

View File

@ -5,11 +5,11 @@ uses utslvclauxiliary,utslvclmemstruct,utslvclgdi;
@explan(说明) 表格控件相关 %%
@date(20220510)
**}
type TcustomGridCtl = class(TCustomControl)
type TcustomGridCtl = class(TCustomControl) //自绘制表格基类
{**
@explan(说明) 自绘制表格控件 %%
**}
function Create(AOwner);override;
function Create(AOwner);override; //构造
begin
inherited;
FLocalX := 0;
@ -36,7 +36,7 @@ type TcustomGridCtl = class(TCustomControl)
FVariableRows := false;
FSI := new TScrollinfo();
end
function GetItemRect(i);virtual;
function GetItemRect(i);virtual; //根据行号获得其区域
begin
{**
@explan(说明) 获得行的区域 %%
@ -55,7 +55,7 @@ type TcustomGridCtl = class(TCustomControl)
r[2]:= basex;
return r;
end
function GetItemStartY(i);virtual;
function GetItemStartY(i);virtual; //获得行的top
begin
{**
@explan(说明) 获得行的区域范围 %%
@ -82,7 +82,7 @@ type TcustomGridCtl = class(TCustomControl)
yb -= yp * itv;
return yb;
end
function GetItemYBound(i);virtual;
function GetItemYBound(i);virtual; //获得行的
begin
{**
@explan(说明) 获得行的区域范围 %%
@ -1188,7 +1188,7 @@ type TcustomGridCtl = class(TCustomControl)
FCurrentSizePos;
end
implementation
type TCanvsRgnClipAutoSave=class
type TCanvsRgnClipAutoSave=class()//canvas 裁剪
{**
@expan(说明) 裁剪canvas区域,销毁时还原 %%
**}