|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Setting the selected item of a listbox when only one the text valueHi,
As simple as I am sure this is, I am not able to get something the work. I have a text value (string), and I want to find an item in a listbox where the item matches the string I have, and then set that item as the selected item. How is this done ? Thanks!! Dim item As Integer = ListBox1.FindString(string)
ListBox1.SelectedIndex = item where 'string' is the string you want to find. Rob Show quoteHide quote "ChunkyMonkey" <Chu***@Monkey.com> wrote in message news:ei6otsZ1JHA.1900@TK2MSFTNGP04.phx.gbl... > Hi, > > As simple as I am sure this is, I am not able to get something the work. > > I have a text value (string), and I want to find an item in a listbox > where the item matches the string I have, and then set that item as the > selected item. > > How is this done ? > > > Thanks!! >
Cannot update Access Database
why not inherit from type 'b(Of a)' Problem with turning off Appication Frameworks and with posting al Email Archive program Compilation error Structures inside structures Test - dont bother to read Vb.net[2008] Combo box population from text file (40,000 lines!) Convert an untyped Data Table to a typed Data Table Drawing images in asp.net |
|||||||||||||||||||||||