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

StatusStrip クラス

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

Windows ステータス バー コントロール表します

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

<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class StatusStrip
    Inherits ToolStrip
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
public class StatusStrip : ToolStrip
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
public ref class StatusStrip : public
 ToolStrip
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
public class StatusStrip extends ToolStrip
ComVisibleAttribute(true) 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
public class StatusStrip extends
 ToolStrip
解説解説

StatusStrip では、以前のバージョンStatusBar コントロール機能置換または拡張されていますが、下位互換性維持し必要に応じて今後使用できるように、StatusBar残されています。

StatusStrip コントロールは、Form表示されているオブジェクトに関する情報オブジェクトコンポーネント、またはアプリケーション内のそのオブジェクト操作関連したコンテキスト情報表示します通常StatusStrip コントロールは ToolStripStatusLabel オブジェクト構成され、各オブジェクトにはテキストアイコン、またはその両方表示されます。また StatusStrip には、ToolStripDropDownButton、ToolStripSplitButton、ToolStripProgressBar の各コントロール含めることもできます

既定StatusStrip にはパネルがありません。StatusStripパネル追加するには、ToolStripItemCollection.AddRange メソッド使用するか、デザイン時に StatusStrip Items コレクション エディタ使用して、項目の追加削除並べ替えや、プロパティ変更行います一般的なコマンド実行するには、デザイン時に [StatusStrip タスク] ダイアログ ボックス使用します

使用例使用例

StatusStrip各種の共通プロパティ設定するためのコード例次に示します

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()
      ' 
      ' The following code example demonstrates the syntax for setting
      ' various StatusStrip properties.
      statusStrip1.Dock = System.Windows.Forms.DockStyle.Top
      statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible
      statusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem()
 {toolStripStatusLabel1})
      statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow
      statusStrip1.Location = New System.Drawing.Point(0, 0)
      statusStrip1.Name = "statusStrip1"
      statusStrip1.ShowItemToolTips = True
      statusStrip1.Size = New System.Drawing.Size(292, 22)
      statusStrip1.SizingGrip = False
      statusStrip1.Stretch = False
      statusStrip1.TabIndex = 0
      statusStrip1.Text = "statusStrip1"
      ' 
      ' toolStripStatusLabel1
      ' 
      toolStripStatusLabel1.Name = "toolStripStatusLabel1"
      toolStripStatusLabel1.Size = New System.Drawing.Size(109,
 17)
      toolStripStatusLabel1.Text = "toolStripStatusLabel1"
      ' 
      ' 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 WindowsApplication4
{
    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();
            // 
            // The following code example demonstrates the syntax for
 setting
            // various StatusStrip properties.
            statusStrip1.Dock = System.Windows.Forms.DockStyle.Top;
            statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
            statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[]
 {
            toolStripStatusLabel1});
            statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
            statusStrip1.Location = new System.Drawing.Point(0,
 0);
            statusStrip1.Name = "statusStrip1";
            statusStrip1.ShowItemToolTips = true;
            statusStrip1.Size = new System.Drawing.Size(292, 22);
            statusStrip1.SizingGrip = false;
            statusStrip1.Stretch = false;
            statusStrip1.TabIndex = 0;
            statusStrip1.Text = "statusStrip1";
            // 
            // toolStripStatusLabel1
            // 
            toolStripStatusLabel1.Name = "toolStripStatusLabel1";
            toolStripStatusLabel1.Size = new System.Drawing.Size(109,
 17);
            toolStripStatusLabel1.Text = "toolStripStatusLabel1";
            // 
            // 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.Control
         System.Windows.Forms.ScrollableControl
           System.Windows.Forms.ToolStrip
            System.Windows.Forms.StatusStrip
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「StatusStrip クラス」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS