ToolBar.ToolBarButtonCollection(ToolBar) 建構函式

定義

初始化 ToolBar.ToolBarButtonCollection 類別的新執行個體,並將它指派給指定的工具列。

public:
 ToolBarButtonCollection(System::Windows::Forms::ToolBar ^ owner);
public ToolBarButtonCollection (System.Windows.Forms.ToolBar owner);
new System.Windows.Forms.ToolBar.ToolBarButtonCollection : System.Windows.Forms.ToolBar -> System.Windows.Forms.ToolBar.ToolBarButtonCollection
Public Sub New (owner As ToolBar)

參數

owner
ToolBar

ToolBarToolBarButton 控制項集合的父代。

備註

您通常不會建立 ToolBar.ToolBarButtonCollection 並明確呼叫其建構函式。 藉由參考 Buttons 控制項的 ToolBar 屬性, ToolBar.ToolBarButtonCollection 就會建立 。 然後,您可以取得其屬性和方法的存取權,並將控制項指派 ToolBarButton 給集合。

適用於

另請參閱