
Code AardioLine:35复制
1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.import
win
.ui;import
godking.vlistEx;- mainForm =
win
.form(text="vlistEx - table adapter"
;right=849
;bottom=578
) - mainForm.add(
- vlist={cls=
"vlistEx"
;left=10
;top=10
;right=840
;bottom=570
;db=1
;dl=1
;dr=1
;dt=1
;edge=1
;transparent=1
;z=1
} - )
var
t = { fields={"序号"
,"姓名"
,"年龄"
,"地址"
,"身份证"
} };for
(i=1
;100
;1
){-
var
tt={}; - tt[
"序号"
]="[@rowindex]"
; - tt[
"姓名"
]=math
.random(0
,1
)?(math
.random(1000
,9999
)+"姓名"
):null
; - tt[
"年龄"
]=math
.random(0
,1
)?math
.random(10
,99
):null
; - tt[
"地址"
]=math
.random(0
,1
)?(math
.random(1000
,9999
)+"地址"
):null
; - tt[
"身份证"
]=math
.random(0
,1
)?(math
.random(1000
,9999
)+"身份证"
):null
; - ..
table
.push(t,tt); - }
- mainForm.vlist.setTable(t,,{
80
,100
,100
,100
,200
},0x2); - mainForm.vlist.checkBox.show =
true
; - mainForm.vlist.textColor = 0xFF0000;
- mainForm.vlist.setHeaderHeight(
50
); - mainForm.vlist.headerAlign =
1
; - mainForm.vlist.lineColorH = 0x008800;
- mainForm.vlist.lineColorV = 0xBB9999;
- mainForm.vlist.fillParent();
- mainForm.vlist.onSortColumn =
function
(col,desc){ -
-
if
col>1
owner
.sort( col, desc, 0
,false
,desc ); -
else
return
false
; - }
- mainForm.show();
win
.loopMessage();