[VB6 ] 指定 ListView 的某個 subitems?
事情是這樣的
我有個 ListView 物件有八個 Column
每次在指定某個subitem的時候都要用這樣的語法
dim lt as listitems
set lt = ListView1.ListItems(1)
With lt
.subitems(1) = "Mary"
.subitems(2) = "Female"
.subitems(3) = 30
....
End With
但因為 Column 實在太多了
所以我每次都必須去記每個項目對應的 subitem 號碼
而且這樣除錯起來也不太方便
請問是否有類似取別名的方法
例如: .subitems("Name") = "Mary"
可以讓我的程式碼看起來簡潔一點?
請惠予賜教,感激不盡
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.136.208.251
→
03/21 03:32, , 1F
03/21 03:32, 1F
→
03/21 03:34, , 2F
03/21 03:34, 2F
→
03/21 21:42, , 3F
03/21 21:42, 3F