當前位置: 首頁>>代碼示例>>C#>>正文


C# ToolStripStatusLabel類代碼示例

本文整理匯總了C#中System.Windows.Forms.ToolStripStatusLabel的典型用法代碼示例。如果您正苦於以下問題:C# ToolStripStatusLabel類的具體用法?C# ToolStripStatusLabel怎麽用?C# ToolStripStatusLabel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ToolStripStatusLabel類屬於System.Windows.Forms命名空間,在下文中一共展示了ToolStripStatusLabel類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Form1

//引入命名空間
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();
        }
    }
}
開發者ID:.NET開發者,項目名稱:System.Windows.Forms,代碼行數:64,代碼來源:ToolStripStatusLabel


注:本文中的System.Windows.Forms.ToolStripStatusLabel類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。