1 Reply Latest reply on Jun 8, 2008 9:32 PM by Gregory Lafrance

    Combobox problem

    xrum
      i have a combo box, with a few(about 6) items in it.

      [code]
      mx:ComboBox width="100%" id="cmbSM" close="AddOtherOption(event);">
      <mx:dataProvider>
      <mx:Array>
      <mx:String></mx:String>
      <mx:String>Database</mx:String>
      <mx:String>Desktop</mx:String>
      <mx:String>External Storage Device</mx:String>
      <mx:String>Laptop</mx:String>
      <mx:String>Spreadsheet</mx:String>
      <mx:String>Other</mx:String>
      </mx:Array>
      </mx:dataProvider>
      </mx:ComboBox>
      [/code]


      but, when i run the code. there are always 2 blanks. the first one (obviously), and the one before last. If i select it, it'll show up as Spreadsheet, but if i open the combox again, the "Other" does not show up, but is blank instead.

      anyone had this happen? how do i fix it?

      Thanks!
        • 1. Re: Combobox problem
          Gregory Lafrance Level 6
          You had an empty string in your code.

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
          <mx:ComboBox width="200">
          <mx:dataProvider>
          <mx:Array>
          <mx:String>Database</mx:String>
          <mx:String>Desktop</mx:String>
          <mx:String>External Storage Device</mx:String>
          <mx:String>Laptop</mx:String>
          <mx:String>Spreadsheet</mx:String>
          <mx:String>Other</mx:String>
          </mx:Array>
          </mx:dataProvider>
          </mx:ComboBox>
          </mx:Application>