首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

透明的statictext 在PB11.5 不能触发 单击事件,该怎么解决

2012-03-05 
透明的statictext 在PB11.5 不能触发 单击事件PB8里正常代码如下forwardglobal type uo_transparent_st fr

透明的statictext 在PB11.5 不能触发 单击事件
PB8里正常
代码如下
forward
global type uo_transparent_st from statictext
end type
end forward

global type uo_transparent_st from statictext
integer width = 521
integer height = 148
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "none"
boolean focusrectangle = false
event paint pbm_paint
end type
global uo_transpareDAT* ?nt_st uo_transparent_st

type variables
boolean ib_paintst1
end variables

event paint;if IsValid(this) then //主要是这里的问题
if ib_paintst1 then Return 0
ib_paintst1 = True
Visible = False
Do While Yield()
Loop
Visible = True
ib_paintst1 = False
end if
Return 0
end event

event clicked;//
end event

on uo_transparent_st.create
end on

on uo_transparent_st.destroy
end on

event constructor;backcolor=2^29

end event

那位大哥帮看下,点击一闪一闪的。

[解决办法]
Visible = False 
这名注释下就好了。
不知道会不会有别的问题。
[解决办法]
if IsValid(this) then //主要是这里的问题 
if ib_paintst1 then Return 0 
ib_paintst1 = True 
Visible = False 
Do While Yield() 
Loop 
Visible = True 
//ib_paintst1 = False //这样可以暂时好用
end if 
Return 0 

热点排行