search - (VB.net) Find specified text on an entire line (not just beginning characters) in a listbox -
i have listbox each line contains short 3-4 character model number followed tab , product name model number corresponds to. have textbox using search listbox.
the code using far works somewhat, not how like. if enter search text highlight results in listbox first characters, there anyway search text of entire line (index) of listbox?
right using following:
private sub txtsearch_textchanged(byval sender system.object, byval e system.eventargs) handles txtsearch.textchanged listbox.selectedindex = listbox.findstring(txtsearch.text) end sub
on assumption line representation tostring() of item in list:
listbox.selecteditem.tostring().contains(txtsearch.text)
Comments
Post a Comment