<klip>
   <identity>
      <title>
         API: ComboBox.delItem
      </title>
   </identity>
   <locations>
      <contentsource>
         http://support.klipfolio.com/files/demo/demo.xml
      </contentsource>
      <icon>
         http://www.klipfolio.com/static/klips/klipfolio/sample_icon.png
      </icon>
      <banner>
         http://www.klipfolio.com/static/klips/klipfolio/sample_banner.png   
      </banner>
   </locations>
   <style>
      alert {
         type: item;
      }

      sender {
         itemcol: 2;
         noterow: 1;

         label: 'Sender';

         emphasis: strong;
      }


      summary {
         itemcol: 3;
         noterow: 4;

         wrap: false;

         notelabel: false;
      }

      date {
         itemcol: 4;
         noterow: 2;

         label: 'Date';
      }

      category {
         noterow: 3;

         label: 'Category';
      }


      level {
         itemcol: 1;
         noterow: 5;
         notelabel: false;
         
         type: image;
      }

      url {
         type: link;
      }
            
      id {
         key: override;
      }
   </style>
   <klipscript>
   <![CDATA[

var comboBox;

function onLoad() {

    // Create a new tab
    var tab = Setup.addTab( "New Tab" );

    // Add a drop-down comboBox to the tab
    comboBox = tab.addComboBox();
  
    // Add three items 
    comboBox.addItem( "First Item" );
    comboBox.addItem( "Second Item" );
    comboBox.addItem( "Third Item" );
    comboBox.addItem( "Fourth Item" );

    // Add a handler
    comboBox.onChange = comboBox_onChange;
    
    // Delete item by index
    comboBox.delItem( 0 );
    
    // Delete item by name
    comboBox.delItem( "Second Item" );
}

function comboBox_onChange( index ) {
    trace( "You selected index " + index + " which is '" + this[index] + "'\r\n" );
    trace( "\r\n" );
    // Note: Could use 'this.selected' instead of 'index'
}


function onRefresh()
{
	return Engines.Data.process( Prefs.contentsource );
}
  
   ]]>
   </klipscript>
</klip>

