1 Replies - 426 Views - Last Post: 16 January 2013 - 08:08 AM Rate Topic: -----

#1 codecodex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 16-January 13

how to get the index of the specific selecteditem in listbox?

Posted 16 January 2013 - 02:53 AM

I have this code in my search textbox:
listbox.Items.Clear()
        For Each item As String In c
            If item.Contains(textbox.Text) Then
                listbox.Items.Add(item)
            End If
        Next



The problem is thru searching the search item gets the value of the first index of the first item in the listbox which doesn't equal to their original index. I'm using array.

Is This A Good Question/Topic? 0
  • +

Replies To: how to get the index of the specific selecteditem in listbox?

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5481
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: how to get the index of the specific selecteditem in listbox?

Posted 16 January 2013 - 08:08 AM

Listbox.SelectedIndex
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1