想要listview或treeview中item的文本和图片背景透明,只需以下代码
Constant Long LL_CLR_NONE = 4294967295
Constant Long LL_FIRST =4096
Constant Long LL_SETTEXTBKCOLOR = (LL_FIRST + 38)
Constant Long LL_GETIMAGELIST = (LL_FIRST + 2)
Constant Long LL_SETBKCOLOR = (LL_FIRST + 1)
Constant Long LL_NORMAL= 0
Constant Long LL_SMALL=1
Constant Long LL_STATE=2
//让文本背景色透明,PB12中文本是直接透明的,无需设置
Send(handle(this),LL_SETTEXTBKCOLOR,0,LL_CLR_NONE)
//让图片的背景色透明
Send(handle(this),LL_SETBKCOLOR,0,LL_CLR_NONE)
如果使用pb自带的图片,需要将PictureMaskColor设置为Silver