Share via


WizComboClass.Count Property

Gets a count of the items in the specified wizard combo box.

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

Syntax

'Declaration
Public Overridable ReadOnly Property Count As Integer
'Usage
Dim instance As WizComboClass 
Dim value As Integer 

value = instance.Count
public virtual int Count { get; }
public:
virtual property int Count {
    int get ();
}
public function get Count () : int

Property Value

Type: System.Int32
The number of items in the wizard combo box.

Implements

IWizCombo.Count

Examples

// From the Visual C++ Add Method wizard.

function EnableDisableControls(bStock)
{
   if (bStock)
   {
      window.external.AddSymbol("DISPID_DISABLED", true);
      INTERNAL_NAME.disabled = true;
      PARAMETER_NAME.disabled = true;
      PARAMETER_TYPE.Enabled = false;
      INTERNAL_NAME_LABEL.disabled = true;
      PARAMETER_NAME_LABEL.disabled = true;
      PARAMETER_TYPE_LABEL.disabled = true;

      PARAMETERS.length = 0;
      INTERNAL_NAME.value = "";
      RETURN_TYPE_LIST.ListIndex = RETURN_TYPE_LIST.Count - 1;
      RETURN_TYPE_LIST.Enabled = false;
      RETURN_TYPE_LABEL.disabled = true;
   }
   else
   {
      window.external.AddSymbol("DISPID_DISABLED", false);
      INTERNAL_NAME.disabled = false;
      PARAMETER_NAME.disabled = false;
      PARAMETER_TYPE.Enabled = true;
      INTERNAL_NAME_LABEL.disabled = false;
      PARAMETER_NAME_LABEL.disabled = false;
      PARAMETER_TYPE_LABEL.disabled = false;

      INTERNAL_NAME.value = STOCK_METHODS.Value;
      var strInterfaceType = window.external.FindSymbol("INTERFACE_TYPE");
      var bLocalAttrib = window.external.FindSymbol("LOCAL_ATTRIB");
      if (strInterfaceType == "dispinterface" || (strInterfaceType == "custom" && bLocalAttrib))
      {
         RETURN_TYPE_LIST.Enabled = true;
         RETURN_TYPE_LABEL.disabled = false;
      }
   }
   ToggleButtons();
}

.NET Framework Security

See Also

Reference

WizComboClass Class

WizComboClass Members

Microsoft.VisualStudio.VsWizard Namespace

Other Resources

Designing a Wizard

Visual C++ Extensibility Object Model