给List加上徽章
List的列表项有个字符型属性Badge,可以用来给列表项设置徽章。
一个例子
HtppRequest事件代码
Select
Case e.Path
Case "test.htm"
Dim
wb As New
WeUI
With
wb.AddListGroup("",
"lsg1","简单列表")
.Add("ls1",
"新浪主页").Badge
= "8"
.Add("ls2",
"网易主页").Badge=
" "
End
With
With
wb.AddListGroup("",
"lsg2",
"增加说明的列表")
.Add("ls3","新浪主页",
"sina.com").Badge
= "New"
.Add("ls4","网易主页",
"163.com")
End With
With
wb.AddListGroup("",
"lsg3",
"增加跳转的列表")
.Add("ls5","新浪主页",
"sina.com",
"http://www.sina.com.cn").Badge =
" "
.Add("ls6","网易主页",
"163.com",
"http://www.163.com")
End With
With
wb.AddListGroup("",
"lsg4","增加图标的列表")
.Add("ls7","新浪主页",
"sina.com",
"http://www.sina.com.cn", "./images/sina.png")
.Add("ls8","网易主页",
"163.com",
"http://www.163.com", "./images/163.png").Badge="新"
End
With
e.WriteString(wb.Build)
End
Select
这是通过手机访问的显示效果:
提示:如果Badge被设置为空格,徽章会显示为一个红色小圆。