请升级虚表到最新版

Code AardioLine:51复制
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.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.import
win
.ui;import
godking.vlistEx;- mainForm =
win
.form(text="vlistEx - table adapter"
;right=1039
;bottom=647
) - mainForm.add(
- checklist={cls=
"checklist"
;left=840
;top=8
;right=1032
;bottom=640
;border=1
;items={};z=2
}; - vlist={cls=
"vlistEx"
;left=8
;top=8
;right=832
;bottom=640
;border=1
;db=1
;dl=1
;dr=1
;dt=1
;z=1
} - )
import
godking.paintimport
inet.httpvar
imgs = godking.paint.splitImage("https://aardio.online/upload/files/20250207/1738894054.png"
,6
,6
,0
,0
,0
,0
)for
(i=1
;- mainForm.vlist.addImg(i,imgs[i],false,,);
- }
var
t = { fields={"序号"
,"姓名"
,"年龄"
,"地址"
,"政治面貌"
} };for
(i=1
;100
;1
){-
var
tt={}; - tt[
"序号"
] = "[@rowindex]"
; - tt[
"姓名"
] = "姓名"
+math
.random(1
,999
); - tt[
"年龄"
] = math
.random(10
,99
); - tt[
"地址"
] = "地址"
+math
.random(1
,999
); - tt[
"政治面貌"
] = math
.random(0
,1
)?"党员"
:"群众"
; - ..
table
.push(t,tt); - }
- mainForm.vlist.setTable(t,,
150
,1
); - mainForm.vlist.setRowHeight(
40
); - mainForm.vlist.headerBkcolor = 0xFFDDDD;
- mainForm.vlist.headerFont = ::LOGFONT(name=
"宋体"
;h=14
;color=0xFF0000); - mainForm.vlist.onSortColumn = {
2
,3
,4
,5
,}; - mainForm.vlist.setHeaderButtonRects({
2
,3
,4
,5
},{x=-25
,y=-25
,w=15
,h=15
}); - mainForm.vlist.setHeaderAdditionalText({
2
,3
,4
,5
},""
,"<img name=2,x=-25,y=-25,w=15,h=15>"
); - mainForm.vlist.onHeaderClick =
function
(row,col,mergeCol,x,y,rect,buttonIndex){ -
if
buttonIndex{ -
var
t = mainForm.vlist.getText(,col,false,false); - t =
table
.flat(t); - t = ..
table
.unique(t); - ..
table
.sort(t); - mainForm.checklist.items = t;
-
return
true
; - }
- }
- mainForm.show();
win
.loopMessage();