From 50e0c4b2f55183403ccbe784c6cfc9408e84d392 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Fri, 14 Oct 2022 14:35:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 分割控件问题修正 --- funcext/tvclib/tcustomcontrol.tsf | 17 +++++++++-------- funcext/tvclib/utslvclauxiliary.tsf | 2 +- funcext/tvclib/utslvclgrid.tsf | 12 ++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/funcext/tvclib/tcustomcontrol.tsf b/funcext/tvclib/tcustomcontrol.tsf index ca605a2..3f12c51 100644 --- a/funcext/tvclib/tcustomcontrol.tsf +++ b/funcext/tvclib/tcustomcontrol.tsf @@ -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; \ No newline at end of file diff --git a/funcext/tvclib/utslvclauxiliary.tsf b/funcext/tvclib/utslvclauxiliary.tsf index 68090e6..743936f 100644 --- a/funcext/tvclib/utslvclauxiliary.tsf +++ b/funcext/tvclib/utslvclauxiliary.tsf @@ -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); diff --git a/funcext/tvclib/utslvclgrid.tsf b/funcext/tvclib/utslvclgrid.tsf index 3a79878..8e954c5 100644 --- a/funcext/tvclib/utslvclgrid.tsf +++ b/funcext/tvclib/utslvclgrid.tsf @@ -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ÇøÓò,Ïú»Ùʱ»¹Ô­ %% **}