import win.ui;
import godking.vlistEx;
/*DSG{{*/
mainForm = win.form(text="vlistEx - table adapter";right=455;bottom=247)
mainForm.add(
listview={cls="vlistEx";left=16;top=24;right=440;bottom=240;border=1;z=1}
)
/*}}*/
//======================= 创建虚表 =======================
mainForm.listview.noScroll =true
mainForm.listview.setColumns({"序号","文件"},{50,-1},1);
var t = {
{"[@rowindex]",""}
{"[@rowindex]",""}
{"[@rowindex]",""}
{"[@rowindex]",""}
{"[@rowindex]",""}
}
mainForm.listview.setTable(t,false);
//======================= 功能演示 =======================
mainForm.listview.onDropFiles = function(row/*行*/,col/*列*/,files/*文件数组*/){
/*鼠标拖入文件。row,col为拖放处的单元格行号、列号。files为拖入的文件数组。*/
if row and col==2 owner.setCellText(row,col,files[1])
}
mainForm.show();
win.loopMessage();