ToolStrip.Items プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ToolStripに属するすべての項目を取得します。
public:
virtual property System::Windows::Forms::ToolStripItemCollection ^ Items { System::Windows::Forms::ToolStripItemCollection ^ get(); };
public virtual System.Windows.Forms.ToolStripItemCollection Items { get; }
member this.Items : System.Windows.Forms.ToolStripItemCollection
Public Overridable ReadOnly Property Items As ToolStripItemCollection
プロパティ値
ToolStripに含まれるすべての要素を表すToolStripItemCollection型のオブジェクト。
例
次のコード例では、項目のコレクションを ToolStripに追加します。
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[]
{
this.newToolStripButton,
this.openToolStripButton,
this.saveToolStripButton,
this.printToolStripButton,
this.toolStripSeparator,
this.cutToolStripButton,
this.copyToolStripButton,
this.pasteToolStripButton,
this.toolStripSeparator1,
this.helpToolStripButton});
Me.toolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.newToolStripButton, Me.openToolStripButton, Me.saveToolStripButton, Me.printToolStripButton, Me.toolStripSeparator, Me.cutToolStripButton, Me.copyToolStripButton, Me.pasteToolStripButton, Me.toolStripSeparator1, Me.helpToolStripButton})
注釈
Items コレクションを使用して、表示される項目だけでなく、ToolStripに追加されたすべての項目を取得します。 アイテムはオーバーフロー項目であるため、現在表示されていない場合でも、 Items コレクションに残ります。
ToolStripに現在表示されている項目のみを取得するには、DisplayedItems プロパティを使用します。