combobox

  • Thread starter Thread starter sonic
  • Start date Start date
S

sonic

Hi!
How to write into combobox collection of values in this way:
I see only "january" and if I select this program see 1, for "february" its
2 etc...
thanks
 
Create a class that has 2 members, one for the DisplayMember property of the
ComboBox, and one for the ValueMember. Create an array of instances of that
class, and use it as the DataSource. For more information and examples, see:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.items.aspx
http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.datasource.aspx
http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.objectcollection.aspx
http://msdn2.microsoft.com/en-us/library/system.windows.forms.listcontrol.valuemember.aspx

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
Back
Top