给Panel加上徽章

Panel有个字符型属性Badge,可以用来设置徽章。

一个例子

HtppRequest事件代码:

Select Case e.Path
    Case "test.htm"
        Dim wb As New WeUI
        Dim txt As String =
"
由各种物质组成的巨型球状天体,叫做星球.星球有一定的形状,有自己的运行轨道."
        With wb.AddPanelGroup("","pg1",
"
图文组合列表")
            .Add("pn1",
"
标题一",txt,"./images/button.png","http://www.foxtable.com").Badge = "8"
            With .Add("pn2",
"
标题二",txt,"./images/search.png")
                .Badge= " "
                .AddFoot(
"
文字来源")
                .AddFoot(
"
时间")
                .AddFoot(
"|
其他信息","http://www.foxtable.com")
            End With
        End With
        With wb.AddPanelGroup("","pg2",
"
文字组合列表")
            .Add("pn1",
"
标题一",txt)
            .Add("pn1",
"
标题二",txt,"","http://www.foxtable.com").Badge=""
            With .Add("pn2",
"
标题三",txt)
                .Badge = "New"
                .AddFoot(
"
文字来源")
                .AddFoot(
"
时间")
                .AddFoot(
"|
其他信息","http://www.foxtable.com")
           
End With
        End With
        e.WriteString(wb.Build)
'生成网页

End
Select

下图是通过手机访问的显示效果:

提示:如果Badge被设置为空格,徽章会显示为一个红色小圆。


本页地址:http://www.foxtable.com/mobilehelp/topics/0142.htm