Compartilhar via


WizComboClass.InsertItem(String, Int32) Method

Definition

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

public:
 virtual void InsertItem(System::String ^ bstrItem, int nIndex) = Microsoft::VisualStudio::VsWizard::IWizCombo::InsertItem;
public:
 virtual void InsertItem(Platform::String ^ bstrItem, int nIndex) = Microsoft::VisualStudio::VsWizard::IWizCombo::InsertItem;
 virtual void InsertItem(std::wstring const & bstrItem, int nIndex);
[System.Runtime.InteropServices.DispId(1610743810)]
public virtual void InsertItem (string bstrItem, int nIndex);
[<System.Runtime.InteropServices.DispId(1610743810)>]
abstract member InsertItem : string * int -> unit
override this.InsertItem : string * int -> unit
Public Overridable Sub InsertItem (bstrItem As String, nIndex As Integer)

Parameters

bstrItem
String

Required. A string identifying the item.

nIndex
Int32

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

Implements

Attributes

Examples

//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();   
}  

Applies to