ToolStripSeparator Class

Definition

Represents a line used to group items of a ToolStrip or the drop-down items of a MenuStrip or ContextMenuStrip or other ToolStripDropDown control.

[System.Windows.Forms.Design.ToolStripItemDesignerAvailability(System.Windows.Forms.Design.ToolStripItemDesignerAvailability.ToolStrip | System.Windows.Forms.Design.ToolStripItemDesignerAvailability.ContextMenuStrip)]
public class ToolStripSeparator : System.Windows.Forms.ToolStripItem
Inheritance
Attributes

Inherited Members

System.ComponentModel.Component

System.MarshalByRefObject

System.Object

System.Windows.Forms.ToolStripItem

Remarks

Use a ToolStripSeparator to group related items on a menu or ToolStrip. The ToolStripSeparator is automatically spaced and oriented horizontally or vertically to accord with its container.

You can add a ToolStripSeparator at design time by choosing it from a drop-down list. However, you can also automatically create a ToolStripSeparator by typing a hyphen (-) in either the designer template node or in the Add method.

Constructors

ToolStripSeparator()

Initializes a new instance of the ToolStripSeparator class.

Properties

AutoToolTip

This property is not relevant to this class.

BackgroundImage

This property is not relevant to this class.

BackgroundImageLayout

This property is not relevant to this class.

CanSelect

Gets a value indicating whether the ToolStripSeparator can be selected.

DefaultMargin

Gets the spacing between the ToolStripSeparator and an adjacent item.

DefaultSize

Gets the default size of the ToolStripSeparator.

DisplayStyle

This property is not relevant to this class.

DoubleClickEnabled

This property is not relevant to this class.

Enabled

This property is not relevant to this class.

Font

This property is not relevant to this class.

Image

This property is not relevant to this class.

ImageAlign

This property is not relevant to this class.

ImageIndex

This property is not relevant to this class.

ImageKey

This property is not relevant to this class.

ImageScaling

This property is not relevant to this class.

ImageTransparentColor

This property is not relevant to this class.

RightToLeftAutoMirrorImage

This property is not relevant to this class.

Text

This property is not relevant to this class.

TextAlign

This property is not relevant to this class.

TextDirection

This property is not relevant to this class.

TextImageRelation

This property is not relevant to this class.

ToolTipText

This property is not relevant to this class.

Methods

CreateAccessibilityInstance()

Creates a new accessibility object for the ToolStripSeparator.

GetPreferredSize(Size)

Retrieves the size of a rectangular area into which a ToolStripSeparator can be fitted.

OnFontChanged(EventArgs)

This method is not relevant to this class.

OnPaint(PaintEventArgs)

Raises the Paint event.

SetBounds(Rectangle)

Sets the size and location of the ToolStripSeparator.

Events

DisplayStyleChanged

This event is not relevant to this class.

EnabledChanged

This event is not relevant to this class.

TextChanged

This event is not relevant to this class.