作者PTTLSboy (阿铯)
看板Visual_Basic
标题[.NET] 如何取得listbox.item.tostring的索引值
时间Wed Jul 21 04:08:37 2010
请输入专案类型(网站专案或者应用程式专案):应用程式专案
我取得listbox里的其中一个内容,但我不知道index是几
那内容是:listbox.item.tostring ,我要如何把它的index找出来?
例如类似可以这样得出他的index吗? => listbox.item.index(举例.这段程式是无效的)
还是只能用回圈比对判断得知index?
感谢各位大大解答!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.143.157.7
1F:推 sueadolph:Listbox.SelectedIndex 可以取得使用者点选的index 07/21 05:21
2F:→ sueadolph:SelectedItem 则是传回文字 07/21 05:21
3F:→ PTTLSboy:谢谢,因为这程式是自己跑的,没办法取得listbox.selected- 07/21 10:59
4F:→ PTTLSboy:index 07/21 10:59
5F:推 GaoWan:选再取 listbox.SelectedItem="X" listbox.SelectedIndex 07/24 23:39