文件名称:transparent_st
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:56.51kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
test.gif
transparent_st.pbl
transparent_st.pbw
transparent_st.pbt
效果图.JPG
transparent_st.pbl
transparent_st.pbw
transparent_st.pbt
效果图.JPG
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.