討論串[VB6 ] ListBox的刪除問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓2(2推 0噓 0→)留言2則,0人參與, 最新作者Guestion (Question)時間19年前 (2006/02/06 21:34), 編輯資訊
0
0
0
內容預覽:
抱歉還是有點不太明白.... 如果i= ListCount-1 to 0 的話. 這樣listindex會隨著listcount改變. 但如果是i= 0 to ListCount-1. listindex還會改變嗎? 或者會影響的不是這部分?. --. 發信站: 批踢踢實業坊(ptt.cc).

推噓6(6推 0噓 3→)留言9則,0人參與, 最新作者fumizuki (矇面加菲獅)時間19年前 (2006/02/06 16:42), 編輯資訊
0
0
0
內容預覽:
If List1.MultiSelect = 0 Then '單選. If List1.ListIndex >= 0 Then List1.RemoveItem List1.ListIndex. Else '複選. For i = List1.ListCount - 1 To 0 Step - 1.
(還有240個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Guestion (Question)時間19年前 (2006/02/06 15:32), 編輯資訊
0
0
0
內容預覽:
如果ListBox的MultiSelect為單選時,要刪除選取的資料為:. If List1.ListIndex >=0 Then. List1.RemoveItem List1.ListIndex. End If. 但如果MultiSelect為多選時,以上的程式好像會出錯. 請問該如何修改呢?.
首頁
上一頁
1
下一頁
尾頁