Grid

Grid(网格)通常用于设计首页的功能导航。

一个例子

HttpRequest事件代码:

Select Case e.Path
    Case "test.htm"
       
Dim wb As New WeUI
        wb.AddPageTitle("","pageheader","WeUI",
"
微信网页设计样式库")
        With wb.AddGrid("","g1")
            .Add("c1","Button", "./images/button.png").Attribute =
"onclick='javascript:alert(""
你单击了我!"")'"
            .Add("c2","Cell", "./images/cell.png", "http://www.foxtable.com")
            .Add("c3","Toast", "./images/toast.png", "http://www.foxtable.com")
            .Add("c4","Dialog", "./images/dialog.png", "http://www.foxtable.com")
            .Add("c5","Progress", "./images/progress.png", "http://www.foxtable.com")
            .Add("c6","Msg", "./images/msg.png", "http://www.foxtable.com")
            .Add("c7","Article", "./images/article.png", "http://www.foxtable.com")
            .Add("c8","ActionSheet", "./images/actionSheet.png", "http://www.foxtable.com")
            .Add("c9","Icons", "./images/icons.png", "http://www.foxtable.com")
            .Add("c10","Panel", "./images/panel.png", "http://www.foxtable.com")
            .Add("c11","Tab", "./images/tab.png", "http://www.foxtable.com")
            .Add("c12","SearchBar", "./images/search.png", "http://www.foxtable.com")
        End With
        e.WriteString(wb.Build)

End
Select

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

AddGrid

AddGrid方法用于增加网格,语法:

AddGrid(ParentID,ID)

ParentID 父容器的ID,如果是顶层对象,设置为""即可。
ID 网格ID。

Add

Add方法用于在网格中添加单元格,语法:

Add(ID, Text, Image)
Add(ID, Text, Image, Href)

ID 单元格ID。
Text 单元格文本
Image 单元格图片
Href 可选参数,页面链接地址。


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