Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

ErrorIconAlignment Enumeration

Specifies constants indicating the locations that an error icon can appear in relation to the control with an error.

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

type ErrorIconAlignment

Member nameDescription
BottomLeftThe icon appears aligned with the bottom of the control and the left of the control.
BottomRightThe icon appears aligned with the bottom of the control and the right of the control.
MiddleLeftThe icon appears aligned with the middle of the control and the left of the control.
MiddleRightThe icon appears aligned with the middle of the control and the right of the control.
TopLeftThe icon appears aligned with the top of the control and to the left of the control.
TopRightThe icon appears aligned with the top of the control and to the right of the control.

This enumeration is used by ErrorProvider.

The following example demonstrates using the ErrorProvider class to notify the user of a data entry error. The example creates a Form that contains a TextBox control, a NumericUpDown control, and a ComboBox control, each validating its content, and an ErrorProvider for each control. The example sets error icon options using the BlinkRate and BlinkStyle properties and the SetIconAlignment and SetIconPadding methods. The SetError method is called with or without appropriate error text during a control's Validated event, depending upon the content in the control.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft