ToolStripLayoutStyle Enumeration


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Specifies the possible alignments with which the items of a ToolStrip can be displayed.

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

type ToolStripLayoutStyle

Member nameDescription

Specifies that items flow horizontally or vertically as necessary.


Specifies that items are laid out horizontally and overflow as necessary.


Specifies that items are laid out automatically.


Specifies that items are laid out flush left.


Specifies that items are laid out vertically, are centered within the control, and overflow as necessary.

You control ToolStrip layout by choosing one of the members of ToolStripLayoutStyle with the LayoutStyle property.

Stacking is the arranging of items beside each other at both ends of the ToolStrip. The following list describes the stack layouts.

  • StackWithOverflow is the default. This setting causes the ToolStrip to alter its layout automatically in accordance with the Orientation property to handle dragging and docking scenarios.

  • VerticalStackWithOverflow renders the ToolStrip items beside each other vertically.

  • HorizontalStackWithOverflow renders the ToolStrip items beside each other horizontally.

Alignment determines the end of the ToolStrip to which the item is aligned.

When items do not fit within the ToolStrip, an overflow button automatically appears. The Overflow property setting determines whether an item appears in the overflow area always, as needed, or never.

In the LayoutCompleted event, you can inspect the Placement property to determine whether an item was placed on the main ToolStrip, the overflow ToolStrip, or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main ToolStrip and its Overflow property was set to Never.

Make a ToolStrip movable by putting it in a ToolStripPanel and setting its GripStyle to Visible.

The other layout options are Flow and Table.

Flow layout is the default for ContextMenuStrip, ToolStripDropDownMenu, and ToolStripOverflow. It is similar to the FlowLayoutPanel. The features of Flow layout are as follows:

Table layout is the default for StatusStrip. It is similar to TableLayoutPanel. The features of Table layout are as follows:

.NET Framework
Available since 2.0
Return to top