long ll_handle_1,ll_handle_2,ll_handle_3,ll_handle_4
TreeViewItem ltv_item_1,ltv_item_2,ltv_item_3,ltv_item_4
//在樹形中插入一個項目
treeviewname.InsertItemSort ( handleparent, label, pictureindex )
ll_handle_1 = This.InsertItemsort(
0,ls_province_no + ' ' +ls_province_nm , 1)
This.Getitem(ll_handle_1,ltv_item_1)
ltv_item_1.data = ls_province_no
//顯示第一張圖片
ltv_item_1.pictureindex = 1
//被選中時顯示第二張圖片
ltv_item_1.selectedpictureindex = 2
this.setitem(ll_handle_1,ltv_item_1)
第二個樹柄:
ll_handle_2 = this.insertitemsort(
ll_handle_1,ls_county_no + ' ' + ls_county_nm,1)
this.getitem(ll_handle_2,ltv_item_2)
ltv_item_2.data = ls_county_no
ltv_item_2.pictureindex = 1
ltv_item_2.selectedpictureindex =2
this.setitem(ll_handle_2,ltv_item_2) .......以此類推。