From da2fb858838ebd2d06ec2b5c88b99a15025ccbd0 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Wed, 17 Aug 2022 17:50:07 +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/utslcodeeditor.tsf | 2 +- funcext/tvclib/tgraphiccontrol.tsf | 16 ++++++++++++++++ funcext/tvclib/tslvcl.tsf | 4 ++-- funcext/tvclib/utslvclstdctl.tsf | 3 ++- funcext/tvclib/uvcpropertytypespersistence.tsf | 4 ++-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index d6c0163..e4155fb 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -4122,7 +4122,7 @@ type TEditList=class(TComboBox) begin inherited; width := 280; - maxListItemShow := 30; + dropdowncount := 30; FMaxCoder := 20; ReadONly := false; Editer.OnKeyDown := function(o,e) diff --git a/funcext/tvclib/tgraphiccontrol.tsf b/funcext/tvclib/tgraphiccontrol.tsf index 28461fa..22a0e31 100644 --- a/funcext/tvclib/tgraphiccontrol.tsf +++ b/funcext/tvclib/tgraphiccontrol.tsf @@ -114,6 +114,10 @@ type tgraphiccontrol = class(TControl) end function WMERASEBKGND(o,e):WM_ERASEBKGND;override; begin + if ftransparent then + begin + return 1; + end if e.wparam and e.lparam then begin if(BKBitmap is class(tcustombitmap))and BKBitmap.HandleAllocated()then @@ -153,6 +157,7 @@ type tgraphiccontrol = class(TControl) FTop := 10; FWidth := 80; FHeight := 25; + ftransparent := false; includestate(FControlState,csCustomPaint); end function Recycling();override; @@ -171,7 +176,18 @@ type tgraphiccontrol = class(TControl) end end property OnPaint:eventhandler read FOnPaint write FOnPaint; + property transparent:bool read ftransparent write settransparent; {** @param(OnPaint)(function[TGraphicControl]:bool) 绘制回调,返回true不执行默认绘制 %% **} + private + ftransparent; + function settransparent(v); + begin + nv := v?true:false; + if nv<>ftransparent then + begin + ftransparent := nv; + end + end end; \ No newline at end of file diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index 8c3d27d..fa6a51c 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -707,7 +707,7 @@ type TLabel = class(TGraphicControl) begin return array("name","action","align","anchors","caption","enabled","font", "popupmenu","visible", - "height","width","left","top","color","bkbitmap","parentcolor","parentfont", + "height","width","left","top","color","bkbitmap","parentcolor","parentfont","transparent", "onpopupmenu","onmousedown","onmouseup"); end {** @@ -2424,7 +2424,7 @@ type TComboBox = class(TcustomComboBox) "visible","anchors","align","enabled","parentcolor","parentfont", "height","width","left","top", "readonly","itemindex", - "items","oncloseup","ondropdown","onselchanged","oneditchanged"); + "items","dropdowncount","oncloseup","ondropdown","onselchanged","oneditchanged"); end end diff --git a/funcext/tvclib/utslvclstdctl.tsf b/funcext/tvclib/utslvclstdctl.tsf index 67d4c70..af6885e 100644 --- a/funcext/tvclib/utslvclstdctl.tsf +++ b/funcext/tvclib/utslvclstdctl.tsf @@ -3689,9 +3689,10 @@ type TCustomComboBoxbase=class(TCustomControl) property ondropdown:eventhandler read Fondropdown write Fondropdown; property oncloseup:eventhandler read Foncloseup write Foncloseup; property BtnWidth read FBtnWidth write SetBtnWidth; - property maxListItemShow read FmaxListItemShow write SetmaxListItemShow; + property dropdowncount:integer read FmaxListItemShow write SetmaxListItemShow; {** @param(ItemIndex)(integer)设置当前项序号%% + @param(dropdowncount)(integer)下拉列表项数%% @param(ondropdown)(function[tcomboBox,tuieventbase])下拉框展开回调%% @param(oncloseup)(function[tcomboBox,tuieventbase])下拉框关闭回调%% @param(onselchanged)(function[tcomboBox,tuieventbase])当前选项改变回调%% diff --git a/funcext/tvclib/uvcpropertytypespersistence.tsf b/funcext/tvclib/uvcpropertytypespersistence.tsf index a4fc44a..3803d49 100644 --- a/funcext/tvclib/uvcpropertytypespersistence.tsf +++ b/funcext/tvclib/uvcpropertytypespersistence.tsf @@ -1321,8 +1321,8 @@ type TPropertyBitmap=class(TPropertyType) reti := ""; cbmp := class(tUIglobalData).uigetdata("G_T_BITMAP_"); if d is cbmp then - begin - reti := TSlToHexFormatStr(d.tovcon); + begin + reti := TSlToHexFormatStr(d.tovcon); end ret := "{ "; ret += reti;