StatusStrip.LayoutStyle Property

 

Gets or sets a value indicating how the StatusStrip lays out the items collection.

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

public ToolStripLayoutStyle LayoutStyle { get; set; }

Property Value

Type: System.Windows.Forms.ToolStripLayoutStyle

One of the ToolStripLayoutStyle values. The default is Table.

Use the LayoutStyle property to get or set how items are arranged on the StatusStrip.

The following code example demonstrates a StatusStrip with various common properties set, including the LayoutStyle property.

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";

.NET Framework
Available since 2.0
Return to top
Show: