locked
Why is Listitem undefined? RRS feed

  • Question

  • I have found a lot of examples of how to work with comboboxes and set the selected item and NONE of them work.  I am using Visual Studio 2008.  This is a Windows form Project. Many of the examples show the use of ListItem.  Visual Studio says that ListItem is not defined.  What happened to it?

    Also,

    If I have a combobox and I have a sub that takes a string, how do I use the string to set the selected item in the combobox?

    Thanks

    Monday, March 23, 2009 11:09 PM

Answers

  • I see that there is a built-in ListItem for Web Forms, but not Windows Forms.  Could you point to the example?

    > how do I use the string to set the selected item in the combobox

    Set ComboBox.Text to the item text.



    • Proposed as answer by Kira Qian Wednesday, March 25, 2009 3:35 AM
    • Marked as answer by mentalmidget Wednesday, March 25, 2009 7:31 PM
    Monday, March 23, 2009 11:56 PM