\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET General > A ListBox conundrum


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
My apologies guys, I\'m trying to learn vb.net as I go (I was semi-literate in VB6) what with all its nuances and all.
\r\n
\r\nOk, here\'s what I want to do and where I\'ve come into a bit of confusion about listboxes.
\r\n
\r\nOk, I have a set of players in an array called Player(x,y) - x being the players ID, y being a set attribute of the player - in this case element 1 being the last name.
\r\n
\r\nI wish to set up a listbox on launch will populate any given number of Players, that will allow the user to pick a player using the listbox - by name, rather than by ID# - and have it show the selected players stats.
\r\n
\r\nMy issue is the population and retrieving.
\r\n
\r\nYes, I am aware of how to attach individual items to a listbox (listbox.items.add), but is there anyway to populate the listbox items with an additional value?
\r\n
\r\nE.g Player(1,1) Might be ID#1 and the name might be Reynolds - is it possible for an item to be added as \'Reynolds\' with a value of 1?
\r\n
\r\nThanks in advance?
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[1394923] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 07-10-2012, 08:15 AM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
DrPunk\'s Avatar\r\n\r\n
\r\n \r\n DrPunk\r\n DrPunk is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #1  
Old 07-10-2012, 08:00 AM
KrisDwyer's Avatar
KrisDwyer KrisDwyer is offline
Newcomer
 
Join Date: Jun 2008
Posts: 20
Default A ListBox conundrum


My apologies guys, I'm trying to learn vb.net as I go (I was semi-literate in VB6) what with all its nuances and all.

Ok, here's what I want to do and where I've come into a bit of confusion about listboxes.

Ok, I have a set of players in an array called Player(x,y) - x being the players ID, y being a set attribute of the player - in this case element 1 being the last name.

I wish to set up a listbox on launch will populate any given number of Players, that will allow the user to pick a player using the listbox - by name, rather than by ID# - and have it show the selected players stats.

My issue is the population and retrieving.

Yes, I am aware of how to attach individual items to a listbox (listbox.items.add), but is there anyway to populate the listbox items with an additional value?

E.g Player(1,1) Might be ID#1 and the name might be Reynolds - is it possible for an item to be added as 'Reynolds' with a value of 1?

Thanks in advance?
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->