import win.ui;
import godking.vlistEx;
/*DSG{{*/
mainForm = win.form(text="vlistEx - table adapter";right=607;bottom=319;border="thin")
mainForm.add(
listview={cls="vlistEx";left=16;top=24;right=595;bottom=304;acceptfiles=1;aw=1;db=1;dl=1;dr=1;dt=1;edge=1;hscroll=1;vscroll=1;z=1}
)
/*}}*/
//======================= 创建虚表 =======================
mainForm.listview.setColumns({"三态演示", "两态演示"})
var t = {
{..math.random(0, 2), 0}
{..math.random(0, 2), 1}
{..math.random(0, 2), 0}
{..math.random(0, 2), 0}
{..math.random(0, 2), 1}
}
mainForm.listview.setTable(t,false);
mainForm.listview.headerAlign =1;
//======================= 功能演示 =======================
mainForm.listview.setColumnType(1, 4 /*_vlistEx_ColType_Switch*/ ,true/*点击切换*/, 1, "\0.png" /*图片1*/ , "\1.png" /*图片2*/ , "\2.png" /*图片3*/ )
mainForm.listview.setColumnType(2, 4 /*_vlistEx_ColType_Switch*/ ,true/*点击切换*/, 1, "\off.png" /*图片1*/ , "\on.png" /*图片2*/ )
mainForm.show();
win.loopMessage();