System.Windows.Forms.HorizontalAlignment Enumeration

Specifies how an object or text in a control is horizontally aligned relative to an element of the control.

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public enum HorizontalAlignment

Remarks

This enumeration is used in numerous classes. A partial list of these classes is System.Windows.Forms.CheckedListBox, System.Windows.Forms.ColumnHeader, System.Windows.Forms.ComboBox, System.Windows.Forms.ControlPaint, System.Windows.Forms.Label, System.Windows.Forms.ListBox, System.Windows.Forms.Control, System.Windows.Forms.RichTextBox, and System.Windows.Forms.TextBox.

Members

Member NameDescription
Center

The object or text is aligned in the center of the control element.

Left

The object or text is aligned on the left of the control element.

Right

The object or text is aligned on the right of the control element.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0