다음을 통해 공유


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의 개체입니다 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.

적용 대상

추가 정보