共用方式為


WizComboClass.Count 屬性

指定的精靈清單中取得項目的計數。

命名空間:  Microsoft.VisualStudio.VsWizard
組件:  Microsoft.VisualStudio.VsWizard (在 Microsoft.VisualStudio.VsWizard.dll 中)

語法

'宣告
Public Overridable ReadOnly Property Count As Integer
public virtual int Count { get; }
public:
virtual property int Count {
    int get ();
}
abstract Count : int with get
override Count : int with get
function get Count () : int

屬性值

型別:System.Int32
在 [精靈] 下拉式方塊中的項目數。

實作

IWizCombo.Count

範例

// 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 安全性

請參閱

參考

WizComboClass 類別

Microsoft.VisualStudio.VsWizard 命名空間

其他資源

設計精靈

Visual C++ 擴充性物件模型