ComboBox.Value property

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Jun 30, 2007.

  1. Cableguy

    Cableguy Expert Licensed User

    I bet the title just made you wonder....

    I know there is no value Property....but there should be!!

    I have a combobox in a form that is filled with the name of textboxes....
    When I remove the selected index from the List, it gets removed but the text remains in the combobox....I've tryed various things to either make blanck, like unselected, or go to the index number imediatly before the one removed...

    How to do it?

    Edit:

    Although not listed, is HAS a text property....

    So its Fixed...
     
    Last edited: Jun 30, 2007
  2. Erel

    Erel Administrator Staff Member Licensed User

    The best way is:
    value = ComboBox1.Items(ComboBox1.SelectedIndex)
     
  3. Cableguy

    Cableguy Expert Licensed User

    But how to use it outside selection changed event, wre the value parameter is not passeed?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can use it everywhere:
    v = ComboBox1.Items(ComboBox1.SelectedIndex)
    or
    ComboBox1.Items(ComboBox1.SelectedIndex) = "abc"
     
Loading...