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


このページでは「.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