ToolStripStatusLabel クラス
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
![構文](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
![解説](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
ToolStripStatusLabel は、StatusStrip コントロールの個別のパネルを表します。ToolStripStatusLabel には、アプリケーションの状態を反映するテキストやアイコンを格納できます。ToolStripStatusLabel オブジェクトを検索、追加、または削除するには、ToolStripItemCollection クラスを使用します。
ToolStripStatusLabel は以前のバージョンの StatusBarPanel コントロールの機能を置換または追加しますが、選択により、下位互換性および将来の使用のために StatusBarPanel を保持することもできます。
![使用例](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
ToolStripStatusLabel に各種の共通プロパティを設定するためのコード例を次に示します。
Imports System Imports System.Text Imports System.Windows.Forms Public Class Form1 Inherits Form Private statusStrip1 As StatusStrip Private toolStripStatusLabel1 As ToolStripStatusLabel Public Sub New() InitializeComponent() End Sub <STAThread()> _ Shared Sub Main() Application.EnableVisualStyles() Application.Run(New Form1()) End Sub Private Sub InitializeComponent() statusStrip1 = New System.Windows.Forms.StatusStrip() toolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel() statusStrip1.SuspendLayout() SuspendLayout() ' ' statusStrip1 ' statusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {toolStripStatusLabel1}) statusStrip1.Location = New System.Drawing.Point(0, 248) statusStrip1.Name = "statusStrip1" statusStrip1.Size = New System.Drawing.Size(292, 25) statusStrip1.TabIndex = 0 statusStrip1.Text = "statusStrip1" ' ' toolStripStatusLabel1.BorderSides = CType(System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom, System.Windows.Forms.ToolStripStatusLabelBorderSides) toolStripStatusLabel1.BorderStyle = System.Windows.Forms.Border3DStyle.Raised toolStripStatusLabel1.IsLink = True toolStripStatusLabel1.Name = "toolStripStatusLabel1" toolStripStatusLabel1.Size = New System.Drawing.Size(246, 20) toolStripStatusLabel1.Spring = True toolStripStatusLabel1.Text = "toolStripStatusLabel1" toolStripStatusLabel1.Alignment = ToolStripItemAlignment.Left ' Form1 ' ClientSize = New System.Drawing.Size(292, 273) Controls.Add(statusStrip1) Name = "Form1" statusStrip1.ResumeLayout(False) statusStrip1.PerformLayout() ResumeLayout(False) PerformLayout() End Sub End Class
using System; using System.Text; using System.Windows.Forms; namespace WindowsApplication5 { public class Form1 : Form { private StatusStrip statusStrip1; private ToolStripStatusLabel toolStripStatusLabel1; public Form1() { InitializeComponent(); } [STAThread] static void Main() { Application.EnableVisualStyles(); Application.Run(new Form1()); } private void InitializeComponent() { statusStrip1 = new System.Windows.Forms.StatusStrip(); toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); statusStrip1.SuspendLayout(); SuspendLayout(); // // statusStrip1 // statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripStatusLabel1}); statusStrip1.Location = new System.Drawing.Point(0, 248); statusStrip1.Name = "statusStrip1"; statusStrip1.Size = new System.Drawing.Size(292, 25); statusStrip1.TabIndex = 0; statusStrip1.Text = "statusStrip1"; // // toolStripStatusLabel1.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); toolStripStatusLabel1.BorderStyle = System.Windows.Forms.Border3DStyle.Raised; toolStripStatusLabel1.IsLink = true; toolStripStatusLabel1.Name = "toolStripStatusLabel1"; toolStripStatusLabel1.Size = new System.Drawing.Size(246, 20); toolStripStatusLabel1.Spring = true; toolStripStatusLabel1.Text = "toolStripStatusLabel1"; toolStripStatusLabel1.Alignment = ToolStripItemAlignment.Left; // Form1 // ClientSize = new System.Drawing.Size(292, 273); Controls.Add(statusStrip1); Name = "Form1"; statusStrip1.ResumeLayout(false); statusStrip1.PerformLayout(); ResumeLayout(false); PerformLayout(); } } }
![継承階層](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.ToolStripItem
System.Windows.Forms.ToolStripLabel
System.Windows.Forms.ToolStripStatusLabel
![スレッド セーフ](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
![プラットフォーム](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
![バージョン情報](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
![参照](http://weblio.hs.llnwd.net/e7/img/dict/msdnc/minus.gif)
- ToolStripStatusLabel クラスのページへのリンク