ToolStripStatusLabel クラスとは? わかりやすく解説

ToolStripStatusLabel クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

StatusStrip コントロール内のパネル表します

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

Public Class ToolStripStatusLabel
    Inherits ToolStripLabel
Dim instance As ToolStripStatusLabel
public class ToolStripStatusLabel : ToolStripLabel
public ref class ToolStripStatusLabel : public
 ToolStripLabel
public class ToolStripStatusLabel extends ToolStripLabel
public class ToolStripStatusLabel extends
 ToolStripLabel
解説解説

ToolStripStatusLabel は、StatusStrip コントロール個別パネル表しますToolStripStatusLabel には、アプリケーションの状態を反映するテキストアイコン格納できますToolStripStatusLabel オブジェクト検索追加、または削除するには、ToolStripItemCollection クラス使用します

ToolStripStatusLabel以前のバージョンの StatusBarPanel コントロール機能置換または追加しますが、選択により、下位互換性および将来使用のために StatusBarPanel保持することもできます

使用例使用例

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();

        }
    }
}
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
       System.Windows.Forms.ToolStripItem
         System.Windows.Forms.ToolStripLabel
          System.Windows.Forms.ToolStripStatusLabel
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「ToolStripStatusLabel クラス」の関連用語

ToolStripStatusLabel クラスのお隣キーワード
検索ランキング

   

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



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

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

©2024 GRAS Group, Inc.RSS