ToolStrip::TextDirection Property

 

Gets or sets the direction in which to draw text on a ToolStrip.

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

public:
property ToolStripTextDirection TextDirection {
	virtual ToolStripTextDirection get();
	virtual void set(ToolStripTextDirection value);
}

Property Value

Type: System.Windows.Forms::ToolStripTextDirection

One of the ToolStripTextDirection values. The default is Horizontal.

Exception Condition
InvalidEnumArgumentException

The specified value is not one of the ToolStripTextDirection values.

Use the TextDirection property to get or set the direction of the display text of a ToolStripItem, such as a ToolStripLabel or a ToolStripButton. You can set the TextDirection property on the ToolStrip itself, in which case the setting will apply to each ToolStripItem you add to the ToolStrip, or you can set the TextDirection property differently for each ToolStripItem.

The following code example demonstrates the syntax for setting common ToolStrip properties, including the TextDirection property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: