From 8ea984919020022fe70c41d5b52d3eb4157d0f28 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Thu, 11 Aug 2022 11:46:59 +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 优化细节 --- designer/tslvcldesigner.tsf | 38 +++++++++++++++++++++++++++++++++++- funcext/tvclib/tslvcl.tsf | 39 +++++++++++++++++++++++++++---------- 2 files changed, 66 insertions(+), 11 deletions(-) diff --git a/designer/tslvcldesigner.tsf b/designer/tslvcldesigner.tsf index e1725cb..0475019 100644 --- a/designer/tslvcldesigner.tsf +++ b/designer/tslvcldesigner.tsf @@ -98,7 +98,7 @@ type TDComponent = class() {** @explan(˵Ã÷)¹¤¾ßÀ¸Ìáʾ ¸Ãº¯Êý±ØÐëoverride%% **} - + return dclassname(); return "tcomponent"; end function classification();virtual; @@ -2281,6 +2281,7 @@ type TDImageList = class(TDRootComponent) **} function HitTip();override; begin + return inherited; return "ͼÏñÁбí"; end function bitmapinfo();override; @@ -2361,6 +2362,7 @@ type TDLabel = class(TDComponent) **} function HitTip();override; begin + return inherited; return "¾²Ì¬Îı¾¿ò"; end function IsContainer();override; @@ -2411,6 +2413,7 @@ type TDTimer = class(TDRootComponent) **} function HitTip();override; begin + return inherited; return "¶¨Ê±Æ÷"; end @@ -2519,10 +2522,12 @@ type TDOpenFileADlg = class(TDRootComponent) **} function HitTip();override; begin + return inherited; return "ÎļþÑ¡Ôñ"; end function classification();override; begin + return inherited; return "¶Ô»°¿ò"; end function bitmapinfo();override; @@ -2606,6 +2611,7 @@ type TDInputQuerys = class(TDRootComponent) **} function HitTip();override; begin + return inherited; return "Êý¾ÝÊäÈë¶Ô»°¿ò"; end function bitmapinfo();override; @@ -2828,6 +2834,7 @@ type TDToolBar = class(TDComponent) public function HitTip();override; begin + return inherited; return "¹¤¾ßÀ¸"; end function DefaultAlign();override; @@ -2884,6 +2891,7 @@ type TDStatusBar = class(TDComponent) **} function HitTip();override; begin + return inherited; return "״̬À¸"; end function dclassname();override; @@ -2938,6 +2946,7 @@ type TDTray = class(TDRootComponent) **} function HitTip();override; begin + return inherited; return "ÍÐÅÌ"; end function dclassname();override; @@ -3014,6 +3023,7 @@ type TDMainMenu = class(TDMenuBase) **} function HitTip();override; begin + return inherited; return "Ö÷²Ëµ¥"; end function ComponentClass();override; @@ -3051,6 +3061,7 @@ type TDMenu = class(TDMenuBase) **} function HitTip();override; begin + return inherited; return "menuͨ¹ýÓÒ¼üÌí¼Ó"; end function classification();override; @@ -3111,6 +3122,7 @@ type TDAction = class(TDComponent) **} function HitTip();override; begin + return inherited; return "tactionͨ¹ýÓÒ¼üÌí¼Ó"; end function IsContainer();override; @@ -3280,6 +3292,7 @@ type TDPopUpMenu = class(TDMenuBase) **} function HitTip();override; begin + return inherited; return "ÓÒ¼ü²Ëµ¥"; end function libs();override; @@ -3313,6 +3326,7 @@ end type TDClipBoard = class(TDRootComponent) function HitTip();override; begin + return inherited; return "¼ôÇаå"; end function libs();override; @@ -3351,6 +3365,7 @@ end type TDQuotations = class(TDRootComponent) function HitTip();override; begin + return inherited; return "ÐÐÇé¶©ÔÄ"; end function libs();override; @@ -3516,6 +3531,7 @@ type TDTreeView = class (TDComponent) **} function HitTip();override; begin + return inherited; return "Ê÷¿Ø¼þ"; end function dclassname();override; @@ -3627,6 +3643,7 @@ type TDListView = class(TDComponent) **} function HitTip();override; begin + return inherited; return "ÁбíÊÓͼ¿Ø¼þ"; end function IsContainer();override; @@ -7976,6 +7993,7 @@ end type TDedit= class(TDComponent) function HitTip();override; begin + return inherited; return "Îı¾¿ò¿Ø¼þ"; end function bitmapinfo();override; @@ -8014,6 +8032,7 @@ end type TDmemo= class(TDComponent) function HitTip();override; begin + return inherited; return "¶àÐÐÎı¾"; end function bitmapinfo();override; @@ -8082,6 +8101,7 @@ end type TDpassword= class(TDComponent) function HitTip();override; begin + return inherited; return "ÃÜÂë¿ò"; end function bitmapinfo();override; @@ -8158,6 +8178,7 @@ end type TDcomboBox= class(TDComponent) function HitTip();override; begin + return inherited; return "ÏÂÀ­Ñ¡Ôñ¿ò"; end function bitmapinfo();override; @@ -8243,6 +8264,7 @@ type TDradiobtn = class(TDComponent) function HitTip();override; begin + return inherited; return "µ¥Ñ¡¿ò"; end function bitmapinfo();override; @@ -8292,6 +8314,7 @@ type TDipaddr= class(TDComponent) **} function HitTip();override; begin + return inherited; return "ipµØÖ·¿Ø¼þ"; end function bitmapinfo();override; @@ -8401,6 +8424,7 @@ type TDListBox=class(TDComponent) end function HitTip();override; begin + return inherited; return "Áбí¿ò"; end function dclassname();override; @@ -8468,6 +8492,7 @@ type TDCalendar=class(TDComponent) end function HitTip();override; begin + return inherited; return "ÈÕÀú"; end function dclassname();override;begin @@ -8509,6 +8534,7 @@ type TDProgressBar=class(TDComponent) return 0; end function HitTip();override;begin + return inherited; return "½ø¶ÈÌõ"; end function dclassname();override;begin @@ -8550,6 +8576,7 @@ type TDCheckBtn=class(TDComponent) return 0; end function HitTip();override;begin + return inherited; return "¸´Ñ¡¿ò"; end function dclassname();override;begin @@ -8606,6 +8633,7 @@ public return 0; end function HitTip();override;begin + return inherited; return "ʱ¼äÈÕÆÚÑ¡Ôñ"; end function dclassname();override;begin @@ -8637,6 +8665,7 @@ type TDTimePicker=class(TDComponent) return 0; end function HitTip();override;begin + return inherited; return "ʱ¼äÑ¡Ôñ"; end function dclassname();override;begin @@ -8774,6 +8803,7 @@ end type TDPanel = class(TDComponent) function HitTip();override; begin + return inherited; return "ÈÝÆ÷¿Ø¼þ"; end @@ -8822,6 +8852,7 @@ type TDGroupBox = class(TDComponent) **} function HitTip();override; begin + return inherited; return "·Ö×é¿ò"; end function dclassname();override; @@ -8857,6 +8888,7 @@ end type TDBtn = class(TDComponent) function HitTip();override; begin + return inherited; return "°´Å¥"; end function IsContainer();override; @@ -8900,6 +8932,7 @@ end type TDPairSplitterSide = class(TDComponent) function HitTip();override; begin + return inherited; return "PairSplitterSide\r\nÔÚsplitter¿Ø¼þÖÐÓÒ¼üÌí¼Ó"; end function dclassname();override; @@ -8946,6 +8979,7 @@ end type TDPairSplitter = class(TDComponent) function HitTip();override; begin + return inherited; return "³É¶Ô·ÖÅäÆ÷"; end function dclassname();override; @@ -9017,6 +9051,7 @@ type TDTabSheet = class(TDComponent) end function HitTip();override; begin + return inherited; return "pagesheet\r\nÔÚpage¿Ø¼þÖÐÓÒ¼üÌí¼Ó"; end function dclassname();override; @@ -9065,6 +9100,7 @@ end type TDPage = class(TDComponent) function HitTip();override; begin + return inherited; return "Ò³Ãæ¿Ø¼þ"; end function dclassname();override; diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index 18a517a..441cf74 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -1554,7 +1554,7 @@ type tbtn = class(tcustombtn) function publishs();override; begin return array("name","action","left","top","width","height", - "align","anchors","caption","font","enabled","visible","bkbitmap","color","tabstop","onclick","onmousemove"); + "align","anchors","caption","font","enabled","visible","bkbitmap","color","tabstop","onclick","onmousemove","onsetfocus","onkillfocus"); end end @@ -2994,7 +2994,7 @@ type TPairSplitterSide=class(TCustomControl) return array("name","border","caption","color","popupmenu","bkbitmap","wsdlgmodalframe","onsize"); end end -type TPairSplitter=class(TWinControl) // +type TPairSplitter=class(tcustomcontrol) // {** @explan(˵Ã÷)·Ö¸î¿Ø¼þ %% **} @@ -3031,7 +3031,7 @@ type TPairSplitter=class(TWinControl) // end Function SetSplitterType(v); begin - if v in array(pstHorizontal,pstVertical)and v <> FSplitterType then + if (v in array(pstHorizontal,pstVertical)) and v <> FSplitterType then begin FSplitterType := v; if FSplitterType=pstVertical then cursor := OCR_SIZENS else cursor := OCR_SIZEWE; @@ -3078,10 +3078,7 @@ type TPairSplitter=class(TWinControl) // FSplitterType := pstHorizontal; cursor := OCR_SIZEWE; FWill_Drag := true; - end - function CreateParams(p);override; - begin - inherited; + Color := _wapi.GetSysColor(COLOR_MENUBAR); end function AddSide(ASide); begin @@ -3110,12 +3107,32 @@ type TPairSplitter=class(TWinControl) // begin _wapi.ImageList_DragLeave(self.Handle); _wapi.ImageList_EndDrag(); + r := ClientRect; if FSplitterType=pstHorizontal then begin - FPosition := e.xpos; + x := e.xpos ; + if x<(r[0]+2) then + begin + x := r[0]+5; + end else + if x>(r[2]-2) then + begin + x := r[2]-5; + end + FPosition := x; end else begin - FPosition := e.ypos; + x := e.ypos; + if x<(r[1]+2) then + begin + x := r[1]+5; + end else + if x>(r[3]-2) then + begin + x := r[3]-5; + end + + FPosition :=x; end EnabledChild(true); FWill_Drag := true; @@ -3225,6 +3242,7 @@ type TPairSplitter=class(TWinControl) // end function WMERASEBKGND(o,e):WM_ERASEBKGND;override; begin + return inherited; dc := e.wparam; if dc then begin @@ -3265,12 +3283,13 @@ type TPairSplitter=class(TWinControl) // e.Result := 1; end end + property Position:integer read GetPosition write SetPosition; property SplitterType:SplitterType read FSplitterType write SetSplitterType; function publishs();override; begin return array("name","left","top","width","height", - "align","anchors","border","caption","enabled","visible","SplitterType","position", + "align","anchors","border","caption","enabled","visible","splittertype","position", "wsdlgmodalframe","wscaption","wspopup","wssizebox","wssysmenu"); end {**