-
import win.ui;
-
/*DSG{{*/
-
var winform = ..win.form( bottom=399;parent=...;text="AAuto Form";right=599 )
-
winform.add(
-
listview={ bgcolor=16777215;bottom=291;right=520;left=21;top=46;z=1;gridLines=1;edge=1;cls="listview" };
-
edit={ text="edit";bottom=363;right=431;left=82;top=337;z=2;edge=1;cls="edit" }
-
)
-
/*}}*/
-
-
winform.listview.insertColumn("dfdfd",150)
-
winform.listview.insertColumn("dfdfd",150)
-
winform.listview.insertColumn("dfdfd",-1)
-
winform.listview.addItem({"sdfsdf";'sdfd645';'fkdl'})
// 插入控件
-
winform.listview.addCtrl(
-
btn = {
-
cls="button";left=0;top=0;right=50;bottom=50;autoResize=false ;edge=1;
-
oncommand=function(id,event){
-
winform.msgboxTest(winform.edit.text)
-
}
-
}
-
)
//winform.cmdTranslate 转发命令消息,在父控件wndproc消息回调中调用,用于启用子控件的oncommand事件.
-
winform.listview.wndproc = function(hwnd,message,wParam,lParam){
-
winform.cmdTranslate(hwnd,message,wParam,lParam);
-
}
// 设置内嵌控件的位置
-
var rc = winform.listview.getItemRect(1,3,,2)
-
winform.listview.btn.setRect(rc)
-
-
winform.show()
-
win.loopMessage();