Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding ID as index in Listbox

Status
Not open for further replies.

TimGoff

Technical User
Jul 16, 2002
166
GB
Hello all,

I'm currently migrating some code from VB6 to .NET v2. In VB6 I populated the list box with the code below, using Channel_ID as the index. I can't find a way though to do this in .NET. Has anyone any thoughts?

lstListBox.AddItem !Channel_Name
lstListbox.ItemData(lstListbox.NewIndex) = !Channel_ID

Thanks in advance.
Tim
 
try something like

listbox.items.add(new ListItem("ID","Text"))

apologies if syntax isnt 100%, thats off the top of my head

K
 
Kalisto,
Thanks for your reply.
Where can I find the Listitem object?
Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top