ToolBar.ToolBarButtonCollection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
주의
ToolBar is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use ToolStrip instead.
클래스에서 사용할 ToolBarButton 컨트롤 컬렉션을 ToolBar 캡슐화합니다.
public: ref class ToolBar::ToolBarButtonCollection : System::Collections::IList
public class ToolBar.ToolBarButtonCollection : System.Collections.IList
[System.ComponentModel.Browsable(false)]
[System.Obsolete("`ToolBar` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `ToolStrip` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public class ToolBar.ToolBarButtonCollection : System.Collections.IList
type ToolBar.ToolBarButtonCollection = class
interface IList
interface ICollection
interface IEnumerable
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("`ToolBar` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `ToolStrip` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
type ToolBar.ToolBarButtonCollection = class
interface IList
interface ICollection
interface IEnumerable
Public Class ToolBar.ToolBarButtonCollection
Implements IList
- 상속
-
ToolBar.ToolBarButtonCollection
- 특성
- 구현
예제
다음 코드 예제에서는 컨트롤 1개와 3 ToolBar 개를 ToolBarButton 만들고 초기화합니다. 도구 모음 단추가 도구 모음에 할당되고 도구 모음이 양식에 추가됩니다. 이 코드를 사용하려면 이미 만든 코드가 필요합니다 Form .
public:
void InitializeMyToolBar()
{
// Create and initialize the ToolBarButton controls and ToolBar.
ToolBar^ toolBar1 = gcnew ToolBar;
ToolBarButton^ toolBarButton1 = gcnew ToolBarButton;
ToolBarButton^ toolBarButton2 = gcnew ToolBarButton;
ToolBarButton^ toolBarButton3 = gcnew ToolBarButton;
// Set the Text properties of the ToolBarButton controls.
toolBarButton1->Text = "Open";
toolBarButton2->Text = "Save";
toolBarButton3->Text = "Print";
// Add the ToolBarButton controls to the ToolBar.
toolBar1->Buttons->Add( toolBarButton1 );
toolBar1->Buttons->Add( toolBarButton2 );
toolBar1->Buttons->Add( toolBarButton3 );
// Add the ToolBar to the Form.
Controls->Add( toolBar1 );
}
public void InitializeMyToolBar()
{
// Create and initialize the ToolBarButton controls and ToolBar.
ToolBar toolBar1 = new ToolBar();
ToolBarButton toolBarButton1 = new ToolBarButton();
ToolBarButton toolBarButton2 = new ToolBarButton();
ToolBarButton toolBarButton3 = new ToolBarButton();
// Set the Text properties of the ToolBarButton controls.
toolBarButton1.Text = "Open";
toolBarButton2.Text = "Save";
toolBarButton3.Text = "Print";
// Add the ToolBarButton controls to the ToolBar.
toolBar1.Buttons.Add(toolBarButton1);
toolBar1.Buttons.Add(toolBarButton2);
toolBar1.Buttons.Add(toolBarButton3);
// Add the ToolBar to the Form.
Controls.Add(toolBar1);
}
Public Sub InitializeMyToolBar()
' Create and initialize the ToolBarButton controls and ToolBar.
Dim toolBar1 As New ToolBar()
Dim toolBarButton1 As New ToolBarButton()
Dim toolBarButton2 As New ToolBarButton()
Dim toolBarButton3 As New ToolBarButton()
' Set the Text properties of the ToolBarButton controls.
toolBarButton1.Text = "Open"
toolBarButton2.Text = "Save"
toolBarButton3.Text = "Print"
' Add the ToolBarButton controls to the ToolBar.
toolBar1.Buttons.Add(toolBarButton1)
toolBar1.Buttons.Add(toolBarButton2)
toolBar1.Buttons.Add(toolBarButton3)
' Add the ToolBar to the Form.
Controls.Add(toolBar1)
End Sub
설명
이 ToolBar.ToolBarButtonCollection 컬렉션은 도구 모음에 할당된 모든 컨트롤을 ToolBar 보관하기 위해 클래스에서 ToolBarButton 사용하는 인덱싱된 0부터 시작하는 컬렉션입니다. 메서드를 Add 사용하여 개별 단추를 Remove 추가하고 삭제하는 메서드를 사용합니다. 메서드를 Clear 호출하여 컬렉션에서 모든 단추를 제거합니다.
생성자
| Name | Description |
|---|---|
| ToolBar.ToolBarButtonCollection(ToolBar) |
사용되지 않음.
클래스의 새 인스턴스를 ToolBar.ToolBarButtonCollection 초기화하고 지정된 도구 모음에 할당합니다. |
속성
| Name | Description |
|---|---|
| Count |
사용되지 않음.
도구 모음 단추 컬렉션의 단추 수를 가져옵니다. |
| IsReadOnly |
사용되지 않음.
컬렉션이 읽기 전용인지 여부를 나타내는 값을 가져옵니다. |
| Item[Int32] |
사용되지 않음.
도구 모음 단추 컬렉션의 지정된 인덱싱된 위치에 있는 도구 모음 단추를 가져오거나 설정합니다. |
| Item[String] |
사용되지 않음.
ToolBarButton 컬렉션에서 지정된 키를 사용하여 가져옵니다. |
메서드
| Name | Description |
|---|---|
| Add(String) |
사용되지 않음.
지정된 Text 속성 값을 사용하여 도구 모음 단추 컬렉션의 끝에 새 도구 모음 단추를 추가합니다. |
| Add(ToolBarButton) |
사용되지 않음.
지정된 도구 모음 단추를 도구 모음 단추 컬렉션의 끝에 추가합니다. |
| AddRange(ToolBarButton[]) |
사용되지 않음.
이 도구 모음 단추 컬렉션에 도구 모음 단추 컬렉션을 추가합니다. |
| Clear() |
사용되지 않음.
도구 모음 단추 컬렉션에서 모든 단추를 제거합니다. |
| Contains(ToolBarButton) |
사용되지 않음.
지정한 도구 모음 단추가 컬렉션의 구성원인지 여부를 확인합니다. |
| ContainsKey(String) |
사용되지 않음.
지정된 키를 가진 ToolBarButton 키가 컬렉션에 포함되어 있는지 여부를 확인합니다. |
| Equals(Object) |
사용되지 않음.
지정된 개체가 현재 개체와 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetEnumerator() |
사용되지 않음.
도구 모음 단추 컬렉션을 반복하는 데 사용할 수 있는 열거자를 반환합니다. |
| GetHashCode() |
사용되지 않음.
기본 해시 함수로 사용됩니다. (다음에서 상속됨 Object) |
| GetType() |
사용되지 않음.
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| IndexOf(ToolBarButton) |
사용되지 않음.
컬렉션에서 지정된 도구 모음 단추의 인덱스를 검색합니다. |
| IndexOfKey(String) |
사용되지 않음.
지정된 키를 가진 첫 번째 항목의 ToolBarButton 인덱스를 검색합니다. |
| Insert(Int32, ToolBarButton) |
사용되지 않음.
지정된 위치에 있는 도구 모음 단추 컬렉션에 기존 도구 모음 단추를 삽입합니다. |
| MemberwiseClone() |
사용되지 않음.
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| Remove(ToolBarButton) |
사용되지 않음.
도구 모음 단추 컬렉션에서 지정된 단추를 제거합니다. |
| RemoveAt(Int32) |
사용되지 않음.
도구 모음 단추 컬렉션에서 지정된 단추를 제거합니다. |
| RemoveByKey(String) |
사용되지 않음.
컬렉션에서 ToolBarButton 지정된 키를 사용하여 제거합니다. |
| ToString() |
사용되지 않음.
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |
명시적 인터페이스 구현
| Name | Description |
|---|---|
| ICollection.CopyTo(Array, Int32) |
사용되지 않음.
특정 ICollection 인덱스에서 시작하여 Array 요소를 Array복사합니다. |
| ICollection.IsSynchronized |
사용되지 않음.
컬렉션에 대한 액세스가 동기화되었는지 여부를 나타내는 값을 가져옵니다(스레드로부터 안전). |
| ICollection.SyncRoot |
사용되지 않음.
단추 컬렉션에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다. |
| IList.Add(Object) |
사용되지 않음.
지정된 도구 모음 단추를 도구 모음 단추 컬렉션의 끝에 추가합니다. |
| IList.Contains(Object) |
사용되지 않음.
컬렉션에 특정 값이 포함되어 있는지 여부를 확인합니다. |
| IList.IndexOf(Object) |
사용되지 않음.
컬렉션에서 특정 항목의 인덱스를 결정합니다. |
| IList.Insert(Int32, Object) |
사용되지 않음.
지정된 위치에 있는 도구 모음 단추 컬렉션에 기존 도구 모음 단추를 삽입합니다. |
| IList.IsFixedSize |
사용되지 않음.
컬렉션의 크기가 고정되어 있는지 여부를 나타내는 값을 가져옵니다. |
| IList.Item[Int32] |
사용되지 않음.
지정된 인덱스에서 항목을 가져오거나 설정합니다. |
| IList.Remove(Object) |
사용되지 않음.
컬렉션에서 항목의 첫 번째 항목을 제거합니다. |
확장명 메서드
| Name | Description |
|---|---|
| AsParallel(IEnumerable) |
사용되지 않음.
쿼리의 병렬 처리를 사용하도록 설정합니다. |
| AsQueryable(IEnumerable) |
사용되지 않음.
IEnumerable IQueryable변환합니다. |
| Cast<TResult>(IEnumerable) |
사용되지 않음.
IEnumerable 요소를 지정된 형식으로 캐스팅합니다. |
| OfType<TResult>(IEnumerable) |
사용되지 않음.
지정된 형식에 따라 IEnumerable 요소를 필터링합니다. |