string subitem1[] = {"subt11","subt12","subt13","subt14","subt15","subt16"}
string subitem2[] = {"subt21","subt22","subt23","subt24","subt25","subt26"}
string subitem3[] = {"subt31","subt32","subt33","subt34","subt35","subt36"}
string subitem4[] = {"subt41","subt42","subt43","subt44","subt45","subt46"}
string subitem5[] = {"subt51","subt52","subt53","subt54","subt55","subt56"}
string subitem6[] = {"subt61","subt62","subt63","subt64","subt65","subt66"}
if ddplb_1.selectedtext()="t1" then
ddplb_2.additem(subitem1[1],1)
ddplb_2.additem(subitem1[2],2)
ddplb_2.additem(subitem1[3],3)
ddplb_2.additem(subitem1[4],4)
ddplb_2.additem(subitem1[5],5)
elseif ddplb_1.selectedtext()="t2" then
reset(ddplb_2)
ddplb_2.additem(subitem2[1],1)
ddplb_2.additem(subitem2[2],2)
ddplb_2.additem(subitem2[3],3)
ddplb_2.additem(subitem2[4],4)
ddplb_2.additem(subitem2[5],5)
elseif ddplb_1.selectedtext()="t3" then
reset(ddplb_2)
ddplb_2.additem(subitem3[1],1)
ddplb_2.additem(subitem3[2],2)
ddplb_2.additem(subitem3[3],3)
ddplb_2.additem(subitem3[4],4)
ddplb_2.additem(subitem3[5],5)
elseif ddplb_1.selectedtext()="t4" then
reset(ddplb_2)
ddplb_2.additem(subitem4[1],1)
ddplb_2.additem(subitem4[2],2)
ddplb_2.additem(subitem4[3],3)
ddplb_2.additem(subitem4[4],4)
ddplb_2.additem(subitem4[5],5)
elseif ddplb_1.selectedtext()="t5" then
reset(ddplb_2)
ddplb_2.additem(subitem5[1],1)
ddplb_2.additem(subitem5[2],2)
ddplb_2.additem(subitem5[3],3)
ddplb_2.additem(subitem5[4],4)
ddplb_2.additem(subitem5[5],5)
elseif ddplb_1.selectedtext()="t6" then
reset(ddplb_2)
ddplb_2.additem(subitem6[1],1)
ddplb_2.additem(subitem6[2],2)
ddplb_2.additem(subitem6[3],3)
ddplb_2.additem(subitem6[4],4)
ddplb_2.additem(subitem6[5],5)
end if
我不知道应该用什么事件来触发,我用selectionchanged()事件试过,只是得到一点结果,但不是我所要求的。希望有高手指点。