, as shown in the tree, always repeat loading 5 or 6 times project, what's going on?
Itempopulate events:
TreeViewItem ltvi_item
The integer li_rows li_level, li_Cnt
Long li_cnt1, li_cnt2
Li_level=ltvi_item. Level
If li_level & lt; 1 the or li_level & gt; 3 then return
CHOOSE a CASE li_level
CASE 1
A2=FindItem (RootTreeItem! , 0)
If the GetItem (a2, ltvi_item)=1 then return
Ds_dq=Create DataStore
Ds_dq. DataObject="d_zl_dq"
Ds_dq. SetTransObject (SQLCA)
Ds_dq. Retrieve ()
Ltvi_item. PictureIndex=2
Ltvi_item. SelectedpictureIndex=2
Ltvi_item. Children=true
Li_cnt1=ds_dq. Rowcount ()
For li_x=1 To li_cnt1
Ltvi_item. Label=ds_dq. Object. Dq [li_x]
ltvi_item.data=https://bbs.csdn.net/topics/ds_dq.Object.dq [li_x]
Tv_1. InsertItemLast (a2, ltvi_item)
Next
The END CHOOSE
Refresh the treeview events (uf_flash_tree) :
Tv_1. Called deleteitem (0)
Itv_Item. Label="region"
Itv_Item. Data=https://bbs.csdn.net/topics/0
Itv_Item. Pictureindex=3
Itv_Item. Selectedpictureindex=3
Itv_Item. Children=True
Ll_root=tv_1. Insertitemlast (0, Itv_Item)
Tv_1. SelectItem (1)
Tv_1. SetFocus ()
Tv_1. ExpandAll (ll_root)
CodePudding user response:
Should be the problem of the code, it is recommended that you single-step tracking your code, it is easier to find the problemCodePudding user response:
Recommended download instance look at, such as the following:http://download.csdn.net/detail/liubocy/781489