ToolStrip.Items 속성

정의

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

속성 값

ToolStripItemCollection

ToolStripItemCollection에 포함된 모든 요소를 나타내는 ToolStrip 형식 개체입니다.

예제

다음 코드 예제에서는 항목의 컬렉션을 추가 합니다 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 오버플로 항목이므로 현재 표시되지 않더라도 컬렉션에 남아 있습니다.

속성을 DisplayedItems 사용하여 현재 에 표시되는 ToolStrip항목만 검색합니다.

적용 대상

추가 정보