Share via


WizComboClass.InsertItem Method

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)

Syntax

'Declaration
Public Overridable Sub InsertItem ( _
    bstrItem As String, _
    nIndex As Integer _
)
public virtual void InsertItem(
    string bstrItem,
    int nIndex
)
public:
virtual void InsertItem(
    [InAttribute] String^ bstrItem, 
    [InAttribute] int nIndex
)
abstract InsertItem : 
        bstrItem:string * 
        nIndex:int -> unit  
override InsertItem : 
        bstrItem:string * 
        nIndex:int -> unit
public function InsertItem(
    bstrItem : String, 
    nIndex : int
)

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.

Implements

IWizCombo.InsertItem(String, Int32)

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

.NET Framework Security

See Also

Reference

WizComboClass Class

Microsoft.VisualStudio.VsWizard Namespace

Other Resources

Designing a Wizard

Visual C++ Extensibility Object Model