combobox增加删除ITEM 问题
nCnt=thisform.shapE1.combo2.ListCount +1
thisform.shapE1.combo2.AddListItem(captionid,nCnt,1)
thisform.shapE1.combo2.AddListItem(.name,nCnt,2)
[解决办法]
请参考:
两个List控件的数据选取
*-----------------------
示例:
设表单上有List1和List2
List1的Init事件:
This.RowSourceType=1
This.RowSource="A,B,C,D,E,F,G,H,I,J"
This.DisabledItemBackColor=Rgb(255,200,200)
*This.DisabledItemForeColor=Rgb(0,0,0)
List1的DblClick事件:
Thisform.list2.AddListItem(This.ListItem(This.ListItemId),Thisform.list2.ListCount+1,1)
Thisform.list2.AddListItem(Transform(This.ListItemId),Thisform.list2.ListCount,2)
This.ListItem(This.ListItemId)="\"+This.ListItem(This.ListItemId)
List2的DblClick事件:
Thisform.list1.ListItem(Val(This.ListItem(This.ListItemId,2)))=This.ListItem(This.ListItemId)
This.RemoveListItem(This.ListItemId)