ToolBar.ToolBarButtonCollectionとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ToolBar.ToolBarButtonCollectionの意味・解説 

ToolBar.ToolBarButtonCollection クラス

ToolBar クラスによって使用される ToolBarButton コントロールコレクションカプセル化ます。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Class ToolBarButtonCollection
    Implements IList, ICollection, IEnumerable
Dim instance As ToolBarButtonCollection
public class ToolBarButtonCollection : IList,
 ICollection, IEnumerable
public ref class ToolBarButtonCollection :
 IList, ICollection, IEnumerable
public class ToolBarButtonCollection implements
 IList, ICollection, 
    IEnumerable
public class ToolBarButtonCollection implements
 IList, ICollection, 
    IEnumerable
解説解説
使用例使用例

ToolBar3 つの ToolBarButton コントロール作成および初期化するコード例次に示しますツール バー ボタンツール バー割り当てられツール バーフォーム追加されます。このコードは、Form が既に作成されていることを前提にしています。

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

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:
   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.set_Text("Open");
    toolBarButton2.set_Text("Save");
    toolBarButton3.set_Text("Print");

    // Add the ToolBarButton controls to the ToolBar.
    toolBar1.get_Buttons().Add(toolBarButton1);
    toolBar1.get_Buttons().Add(toolBarButton2);
    toolBar1.get_Buttons().Add(toolBarButton3);

    // Add the ToolBar to the Form.
    get_Controls().Add(toolBar1);
} //InitializeMyToolBar
継承階層継承階層
System.Object
  System.Windows.Forms.ToolBar.ToolBarButtonCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolBar.ToolBarButtonCollection メンバ
System.Windows.Forms 名前空間
ToolBar クラス
ToolBarButton

ToolBar.ToolBarButtonCollection コンストラクタ

ToolBar.ToolBarButtonCollection クラス新しインスタンス初期化し指定されツール バー割り当てます

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim owner As ToolBar

Dim instance As New ToolBarButtonCollection(owner)
public ToolBarButtonCollection (
    ToolBar owner
)
public:
ToolBarButtonCollection (
    ToolBar^ owner
)
public ToolBarButtonCollection (
    ToolBar owner
)
public function ToolBarButtonCollection (
    owner : ToolBar
)

パラメータ

owner

ToolBarButton コントロールコレクションの親である ToolBar

解説解説

通常は、ToolBar.ToolBarButtonCollection作成して、そのコンストラクタ明示的に呼び出す必要はありません。ToolBar コントロールButtons プロパティ参照すると、ToolBar.ToolBarButtonCollection作成されます。その後オブジェクトプロパティおよびメソッドアクセス可能となり、コレクションToolBarButton コントロール割り当てることができます

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolBar.ToolBarButtonCollection クラス
ToolBar.ToolBarButtonCollection メンバ
System.Windows.Forms 名前空間
ToolBarButton

ToolBar.ToolBarButtonCollection プロパティ


パブリック プロパティパブリック プロパティ

明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.IList.Item 指定したインデックスにある項目を取得または設定します
参照参照

関連項目

ToolBar.ToolBarButtonCollection クラス
System.Windows.Forms 名前空間
ToolBar クラス
ToolBarButton

ToolBar.ToolBarButtonCollection メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add オーバーロードされます新しツール バー ボタンツール バー ボタン コレクション末尾追加します
パブリック メソッド AddRange ツール バー ボタンコレクションをこのツール バー ボタン コレクション追加します
パブリック メソッド Clear ツール バー ボタン コレクションからすべてのボタン削除します
パブリック メソッド Contains 指定したツール バー ボタンコレクションメンバかどうか確認します
パブリック メソッド ContainsKey 指定したキーの ToolBarButton がコレクション内にあるかどうか判断します
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetEnumerator ツール バー ボタン コレクション反復処理するために使用できる列挙子を返します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド IndexOf コレクション内の指定したツール バー ボタンインデックス取得します
パブリック メソッド IndexOfKey 指定したキーを持つ ToolBarButton最初に出現するインデックス取得します
パブリック メソッド Insert ツール バー ボタン コレクション内の指定した位置既存ツール バー ボタン挿入します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Remove ツール バー ボタン コレクションから指定したボタン削除します
パブリック メソッド RemoveAt ツール バー ボタン コレクションから指定したボタン削除します
パブリック メソッド RemoveByKey 指定したキーToolBarButtonコレクションから削除します
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.ICollection.CopyTo ICollection の要素ArrayコピーしますArray特定のインデックスからコピー開始されます。
インターフェイスの明示的な実装 System.Collections.IList.Add 指定されツール バー ボタンツール バー ボタン コレクション末尾追加します
インターフェイスの明示的な実装 System.Collections.IList.Contains コレクション特定の値格納されているかどうか判断します
インターフェイスの明示的な実装 System.Collections.IList.IndexOf コレクション内での指定した項目のインデックス調べます
インターフェイスの明示的な実装 System.Collections.IList.Insert ツール バー ボタン コレクション内の指定した位置既存ツール バー ボタン挿入します
インターフェイスの明示的な実装 System.Collections.IList.Remove 最初に出現する項目をコレクションから削除します
参照参照

関連項目

ToolBar.ToolBarButtonCollection クラス
System.Windows.Forms 名前空間
ToolBar クラス
ToolBarButton

ToolBar.ToolBarButtonCollection メンバ

ToolBar クラスによって使用される ToolBarButton コントロールコレクションカプセル化ます。

ToolBar.ToolBarButtonCollection データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ToolBar.ToolBarButtonCollection ToolBar.ToolBarButtonCollection クラス新しインスタンス初期化し指定されツール バー割り当てます
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add オーバーロードされます新しツール バー ボタンツール バー ボタン コレクション末尾追加します
パブリック メソッド AddRange ツール バー ボタンコレクションをこのツール バー ボタン コレクション追加します
パブリック メソッド Clear ツール バー ボタン コレクションからすべてのボタン削除します
パブリック メソッド Contains 指定したツール バー ボタンコレクションメンバかどうか確認します
パブリック メソッド ContainsKey 指定したキーToolBarButtonコレクション内にあるかどうか判断します
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetEnumerator ツール バー ボタン コレクション反復処理するために使用できる列挙子を返します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド IndexOf コレクション内の指定したツール バー ボタンインデックス取得します
パブリック メソッド IndexOfKey 指定したキーを持つ ToolBarButton最初に出現するインデックス取得します
パブリック メソッド Insert ツール バー ボタン コレクション内の指定した位置既存ツール バー ボタン挿入します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Remove ツール バー ボタン コレクションから指定したボタン削除します
パブリック メソッド RemoveAt ツール バー ボタン コレクションから指定したボタン削除します
パブリック メソッド RemoveByKey 指定したキーToolBarButtonコレクションから削除します
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.ICollection.CopyTo ICollection の要素ArrayコピーしますArray特定のインデックスからコピー開始されます。
インターフェイスの明示的な実装 System.Collections.IList.Add 指定されツール バー ボタンツール バー ボタン コレクション末尾追加します
インターフェイスの明示的な実装 System.Collections.IList.Contains コレクション特定の値格納されているかどうか判断します
インターフェイスの明示的な実装 System.Collections.IList.IndexOf コレクション内での指定した項目のインデックス調べます
インターフェイスの明示的な実装 System.Collections.IList.Insert ツール バー ボタン コレクション内の指定した位置既存ツール バー ボタン挿入します
インターフェイスの明示的な実装 System.Collections.IList.Remove 最初に出現する項目をコレクションから削除します
インターフェイスの明示的な実装 System.Collections.IList.Item 指定したインデックスにある項目を取得または設定します
参照参照

関連項目

ToolBar.ToolBarButtonCollection クラス
System.Windows.Forms 名前空間
ToolBar クラス
ToolBarButton


このページでは「.NET Framework クラス ライブラリ リファレンス」からToolBar.ToolBarButtonCollectionを検索した結果を表示しています。
Weblioに収録されているすべての辞書からToolBar.ToolBarButtonCollectionを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からToolBar.ToolBarButtonCollection を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ToolBar.ToolBarButtonCollection」の関連用語

ToolBar.ToolBarButtonCollectionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ToolBar.ToolBarButtonCollectionのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS