从“SelectedItems”中删除项目在ListBox中 [英] Removing items from the "SelectedItems" in a ListBox

查看:75
本文介绍了从“SelectedItems”中删除项目在ListBox中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SelectedItems和SelectedIndices似乎是只读的,因此我无法删除

所选项目。我需要这样做来同步我的列表中的选择

与其他视图中的选择(即。在另一个视图中选择并且我的列表中的选定项目更改为

) 。


如何更改列表框中的选定项目???

SelectedItems and SelectedIndices appear to be read-only, so I cannot remove
a selected item. I need to do this to synchronise the selection in my list
with the selection in other views (ie. select in another view and the
selected items in my list change).

How can I change the selected items in a list box!??

推荐答案

嗨罗宾,


您是否尝试过removeAT?

\\\\

listBox1.Items.RemoveAt(x )

///


Cor
Hi Robin,

Did you try the removeAT?
\\\\
listBox1.Items.RemoveAt(x)
///

Cor
SelectedItems和SelectedIndices似乎是只读的,所以我不能
删除所选项目。我需要这样做才能将我的
列表中的选择与其他视图中的选择同步(即。在另一个视图中选择并且列表中的所选项目更改)。

如何更改列表框中的选定项目???
SelectedItems and SelectedIndices appear to be read-only, so I cannot remove a selected item. I need to do this to synchronise the selection in my list with the selection in other views (ie. select in another view and the
selected items in my list change).

How can I change the selected items in a list box!??



" Robin Tucker" <编号********** @ reallyidont.com> schrieb
"Robin Tucker" <id*************************@reallyidont.com> schrieb
SelectedItems和SelectedIndices似乎是只读的,因此我无法删除所选项目。我需要这样做才能将我的列表中的
选择与其他视图中的选择同步(即选择另一个视图和我列表中的选定项目更改)。
如何更改列表框中的选定项目???
SelectedItems and SelectedIndices appear to be read-only, so I cannot
remove a selected item. I need to do this to synchronise the
selection in my list with the selection in other views (ie. select in
another view and the selected items in my list change).

How can I change the selected items in a list box!??




mylistbox.setselected(index,true)

-

Armin

http: //www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html



mylistbox.setselected(index, true)
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


Dim t作为ListBox.SelectedObjectCollection


t = Me.lst_Classification.SelectedItems


你能做这样的事情并做一个t.Add / t。移除什么吗?


-CJ


" Robin Tucker" <编号********** @ reallyidont.com>写在

消息新闻:bu ******************* @ news.demon.co.uk ...
Dim t As ListBox.SelectedObjectCollection

t = Me.lst_Classification.SelectedItems

Could you do something like this and do a t.Add / t.Remove whatever?

-CJ

"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:bu*******************@news.demon.co.uk...
SelectedItems和SelectedIndices似乎是只读的,所以我不能
删除所选项目。我需要这样做才能将我的
列表中的选择与其他视图中的选择同步(即。在另一个视图中选择并且列表中的所选项目更改)。

如何更改列表框中的选定项目???
SelectedItems and SelectedIndices appear to be read-only, so I cannot remove a selected item. I need to do this to synchronise the selection in my list with the selection in other views (ie. select in another view and the
selected items in my list change).

How can I change the selected items in a list box!??



这篇关于从“SelectedItems”中删除项目在ListBox中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆