WizComboClass::InsertItem Method (String^, Int32)

 

Inserts the specified item at the specified location in the wizard combo box.

Namespace:   Microsoft.VisualStudio.VsWizard
Assembly:  Microsoft.VisualStudio.VsWizard (in Microsoft.VisualStudio.VsWizard.dll)

public:
virtual void InsertItem(
	String^ bstrItem,
	int nIndex
)

Parameters

bstrItem
Type: System::String^

Required. A string identifying the item.

nIndex
Type: System::Int32

Required. The zero-based index of the item to be inserted.

//From the default.htm for the Add Event wizard.

function InitDocument(document)
{   
   setDirection();

   if (window.external.FindSymbol("DOCUMENT_FIRST_LOAD"))
   {
      var L_WizardDialogTitle_Text = "Add Event Wizard";
      window.external.AddSymbol("WIZARD_DIALOG_TITLE", L_WizardDialogTitle_Text);
      window.external.SetDefaults(document);
   }
   window.external.Load(document);

      for (var nCntr = 0; nCntr < strTypes.length; nCntr++)
      {
         if (strTypes[nCntr] == "void")
            continue;

         var oOption = document.createElement("OPTION");
         oOption.text = strTypes[nCntr];
         PARAMETER_TYPE.add(oOption);
      }

      for (var nCntr = 0; nCntr < strStockEvents.length; nCntr++)
         STOCK_EVENTS.AddItem(strStockEvents[nCntr]);
      STOCK_EVENTS.InsertItem("", 0);

      CUSTOM.disabled = true;
      STOCK.disabled = true;
      ToggleButtons(); 
}
Return to top
Show: