Este artigo foi traduzido por máquina. Para visualizar o arquivo em inglês, marque a caixa de seleção Inglês. Você também pode exibir o texto Em inglês em uma janela pop-up, movendo o ponteiro do mouse sobre o texto.
Tradução
Inglês

StatusStrip Classe

Representa um Controlarar Barra de status do Windows.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (em System.Windows.Forms. dll)

[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
[ComVisibleAttribute(true)]
public class StatusStrip : ToolStrip

StatusStrip replaces the StatusBar control.Special features of StatusStrip include a custom table layout, support for the form's sizing and moving grips, and support for the Spring property, which allows a ToolStripStatusLabel to fill available space automatically.

The following items are specifically designed to work seamlessly with both ToolStripSystemRenderer and ToolStripProfessionalRenderer in all orientations.They are available by default at design time for the StatusStrip control:

A StatusStrip control displays information about an object being viewed on a Form, the object's components, or contextual information that relates to that object's operation within your application.Typically, a StatusStrip control consists of ToolStripStatusLabel objects, each of which displays text, an icon, or both.The StatusStrip can also contain ToolStripDropDownButton, ToolStripSplitButton, and ToolStripProgressBar controls.

The default StatusStrip has no panels.To add panels to a StatusStrip, use the ToolStripItemCollection.AddRange method, or use the Editor de Coleção Ítens StatusStrip at design time to add, remove, or reorder items and modify properties.Use the Caixa de diálogo StatusStrip Tasks at design time to run common commands.

Although StatusStrip replaces and extends the StatusBar control of previous versions, StatusBar is retained for both backward compatibility and future use if you choose.

The following code example demonstrates a StatusStrip with various common properties set.

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

        }
    }
}


Quaisquer membros públicos estático (compartilhados na Visual Basic) desse tipo são Thread seguro. Não há garantia de que qualquer membro de instância seja isento de segmentos.

Contribuições da comunidade

ADICIONAR
Mostrar: