PB不叫标签控件,叫静态文本static text。
创建一个自定义标准static text,使用的时候直接继承就可以了。
自定义控件创建方法:
声明实例变量:
Boolean ib_painting
Constructor 事件代码
BackColor = 2^29
自定义用户事件,Event ID:pbm_paint
事件代码
if IsValid(This) then
if ib_painting then Return 0
ib_painting = True
Visible = False
Do While Yield()
Loop
Visible = True
ib_painting = False
end if
Return 0