文件名称:transparent_st
介绍说明--下载内容均来自于网络,请自行研究使用
PB中的静态文本控件可以设置各种不同的背景色,但没有办法设置为透明色,这在某些特殊界面设计要求时显得心有余而力不足。本文提供一种实现透明文本的简单方法,并不需要借助API。方法如下:
1、 建立一个工作空间(workspace),取名为:transparent_st。
2、 建立一个应用(application),取名为:transparent_st。
3、 建立一个可视用户对象,uo_transparent_st,类型为statictext,定义下列变量:
boolean ib_painting
4、 编写uo_transparent_st的Constructor事件脚本:
//536870912 透明色
This.backcolor = 2^29
5、 定义uo_transparent_st的用户自定义事件,ue_paint(Event ID:pbm_paint)
IF IsValid(This) THEN
if ib_painting THEN Return 0
ib_painting = True
This.Visible = False
Do While Yield()
Loop
This.Visible = True
ib_painting = False
END IF
Return 0
-PB in the static text control you can set different background color, but there is no way to set a transparent color, which in some special interface design it is very difficult request. This article provides a simple and transparent method of the text is no need to use API. As follows:
1, the establishment of a working space (workspace), named: transparent_st.
2, the establishment of an application (application), named: transparent_st.
3, the establishment of a visual user object, uo_transparent_st, type statictext, the definition of the following variables:
boolean ib_painting
4, the preparation of the Constructor event uo_transparent_st scr ipt:
// Transparent color 536,870,912
This.backcolor = 2 ^ 29
5, the definition of user-defined uo_transparent_st events, ue_paint (Event ID: pbm_paint)
IF IsValid (This) THEN
if ib_painting THEN Return 0
ib_painting = True
This.Visible = False
Do While Yield ()
Loop
1、 建立一个工作空间(workspace),取名为:transparent_st。
2、 建立一个应用(application),取名为:transparent_st。
3、 建立一个可视用户对象,uo_transparent_st,类型为statictext,定义下列变量:
boolean ib_painting
4、 编写uo_transparent_st的Constructor事件脚本:
//536870912 透明色
This.backcolor = 2^29
5、 定义uo_transparent_st的用户自定义事件,ue_paint(Event ID:pbm_paint)
IF IsValid(This) THEN
if ib_painting THEN Return 0
ib_painting = True
This.Visible = False
Do While Yield()
Loop
This.Visible = True
ib_painting = False
END IF
Return 0
-PB in the static text control you can set different background color, but there is no way to set a transparent color, which in some special interface design it is very difficult request. This article provides a simple and transparent method of the text is no need to use API. As follows:
1, the establishment of a working space (workspace), named: transparent_st.
2, the establishment of an application (application), named: transparent_st.
3, the establishment of a visual user object, uo_transparent_st, type statictext, the definition of the following variables:
boolean ib_painting
4, the preparation of the Constructor event uo_transparent_st scr ipt:
// Transparent color 536,870,912
This.backcolor = 2 ^ 29
5, the definition of user-defined uo_transparent_st events, ue_paint (Event ID: pbm_paint)
IF IsValid (This) THEN
if ib_painting THEN Return 0
ib_painting = True
This.Visible = False
Do While Yield ()
Loop
(系统自动生成,下载前可以参看下载内容)
下载文件列表
transparent_st.pbl
transparent_st.pbt
transparent_st.pbw
transparent_st.pbt
transparent_st.pbw