Found the following interesting discussion in the Newsgroups:
| Knew how to do it the old way, but ... by:Ed Staffin | |
| In vb6, I could load a listbox/combobox with strings and values using the list and itemdata properties. WHen I wanted to set the selected item to a value I looked through the itemdata to find a match. In vb7, I can't quite seem to figure it out. I can set the datasource to a datatable, set the display member, set the value member and have everything display properly. However, once I have loaded the listbox/combobox with the data, I can't figure out how to set the selectedIndex property based on a value I have. I tried looking at the items collection, but near as I can tell, that thing is useless. Any guidance would be greatly appreciated. Thanks ... Ed | |
| Reply: by:hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP]) | |
The direct replacement is using custom objects to store additional data: <URL:http://www.google.de/groups?selm=2hemflFbikgkU2%40uni-berlin.de> -- Herfried K. Wagner [MVP] | |
| Reply: by:Armin Zingler | |
http://groups.google.com/groups?threadm=eniMT6RhDHA.3324@TK2MSFTNGP11.phx.gbl> -- Armin How to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html | |
Posted by Xander Zelders

0 Comments:
Post a Comment
<< Home