ToolStrip クラス
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ <ComVisibleAttribute(True)> _ Public Class ToolStrip Inherits ScrollableControl Implements IComponent, IDisposable
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] [ComVisibleAttribute(true)] public class ToolStrip : ScrollableControl, IComponent, IDisposable
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] [ComVisibleAttribute(true)] public ref class ToolStrip : public ScrollableControl, IComponent, IDisposable
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ /** @attribute ComVisibleAttribute(true) */ public class ToolStrip extends ScrollableControl implements IComponent, IDisposable
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) ComVisibleAttribute(true) public class ToolStrip extends ScrollableControl implements IComponent, IDisposable

新しい Windows フォーム アプリケーションの ToolStrip およびその関連クラスを使用すると、Windows XP、Office、Internet Explorer のツール バー、またはカスタムの外観と動作を持つツール バーを作成できます。ツール バーの項目はすべて、テーマ付き、テーマなしのどちらでも作成でき、オーバーフローと実行時の項目の順番変更をサポートします。ToolStrip コントロールは、埋め込み先編集の有効化と編集、カスタム レイアウト、指定した ToolStripContainer 内の水平空間または垂直空間の共有などの、豊富なデザイン時機能も提供します。
ToolStrip は、ToolStripButton、ToolStripComboBox、ToolStripSplitButton、ToolStripLabel、ToolStripSeparator、ToolStripDropDownButton、ToolStripProgressBar、および ToolStripTextBox の各オブジェクトのコンテナです。
ToolStrip クラスは、描画、マウス入力とキーボード入力、およびドラッグ アンド ドロップ機能を管理するさまざまなメンバを提供しますが、ToolStripManager クラスを使用すると、指定した ToolStripContainer 内の ToolStrip コントロールを結合して、ToolStrip コントロールを相互にマージできます。描画とレイアウト スタイルをさらに制御してカスタマイズ性を向上させるには、ToolStripRenderer クラスを ToolStripManager クラスと共に使用します。
ToolStrip 内のその他の任意の Windows フォーム コントロールをホストするには、ToolStripControlHost クラスを使用します。
ToolStrip では、以前のバージョンの ToolBar コントロールの機能が置換または追加されていますが、下位互換性を維持し、必要に応じて今後も使用できるように、ToolBar も残されています。

次のコード例では、Windows フォームに ToolStripContainer と ToolStrip を追加し、さらに、ToolStrip に項目を、ToolStripContainer の TopToolStripPanel に ToolStrip を追加しています。
Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Text Imports System.Windows.Forms Public Class Form1 Inherits Form Private toolStripContainer1 As ToolStripContainer Private toolStrip1 As ToolStrip Public Sub New() InitializeComponent() End Sub 'New <STAThread()> _ Shared Sub Main() Application.EnableVisualStyles() Application.Run(New Form1()) End Sub 'Main Private Sub InitializeComponent() toolStripContainer1 = New System.Windows.Forms.ToolStripContainer() toolStrip1 = New System.Windows.Forms.ToolStrip() ' Add items to the ToolStrip. toolStrip1.Items.Add("One") toolStrip1.Items.Add("Two") toolStrip1.Items.Add("Three") ' Add the ToolStrip to the top panel of the ToolStripContainer. toolStripContainer1.TopToolStripPanel.Controls.Add(toolStrip1) ' Add the ToolStripContainer to the form. Controls.Add(toolStripContainer1) End Sub 'InitializeComponent End Class 'Form1
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; public class Form1 : Form { private ToolStripContainer toolStripContainer1; private ToolStrip toolStrip1; public Form1() { InitializeComponent(); } [STAThread] static void Main() { Application.EnableVisualStyles(); Application.Run(new Form1()); } private void InitializeComponent() { toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); toolStrip1 = new System.Windows.Forms.ToolStrip(); // Add items to the ToolStrip. toolStrip1.Items.Add("One"); toolStrip1.Items.Add("Two"); toolStrip1.Items.Add("Three"); // Add the ToolStrip to the top panel of the ToolStripContainer. toolStripContainer1.TopToolStripPanel.Controls.Add(toolStrip1); // Add the ToolStripContainer to the form. Controls.Add(toolStripContainer1); } }

System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.ToolStrip
System.Windows.Forms.BindingNavigator
System.Windows.Forms.MenuStrip
System.Windows.Forms.StatusStrip
System.Windows.Forms.ToolStripDropDown


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からToolStrip クラスを検索する場合は、下記のリンクをクリックしてください。

- ToolStrip クラスのページへのリンク