다음을 통해 공유


방법: 탭 페이지에 컨트롤 추가

업데이트: 2007년 11월

Windows Forms TabControl을 사용하면 체계적인 방식으로 다른 컨트롤을 표시할 수 있습니다. 다음 절차는 탭 페이지의 주요 부분에 그림을 표시하는 방법을 보여 줍니다. 탭 페이지의 레이블 부분에 아이콘을 추가하는 방법에 대한 자세한 내용은 방법: Windows Forms TabControl의 모양 변경을 참조하십시오.

프로그래밍 방식으로 컨트롤을 추가하려면

  • TabPageControls 속성에서 반환된 컬렉션의 Add 메서드를 사용합니다.

    ' Assuming that TabControl1 exists and has at least one tab page
    ' Add a button to the first tab page
    TabPage1.Controls.Add(New Button())
    
    // Assuming that tabControl1 exists and has at least one tab page
    // Add a button to the first tab page
    tabPage1.Controls.Add(new Button());
    
    // Assuming that tabControl1 exists and has at least one tab page
    // Add a button to the first tab page
    tabPage1.get_Controls().Add(new Button());
    
    // Assuming that tabControl1 exists and has at least one tab page
    // Add a button to the first tab page
    tabPage1->Controls->Add(gcnew Button());
    

참고 항목

작업

방법: Windows Forms TabControl의 모양 변경

방법: 탭 페이지 사용 안 함

방법: Windows Forms TabControl을 사용하여 탭 추가 및 제거

참조

TabControl 컨트롤 개요(Windows Forms)

기타 리소스

TabControl 컨트롤(Windows Forms)