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
BottomLeft

The icon appears aligned with the bottom of the control and the left of the control.

BottomRight

The icon appears aligned with the bottom of the control and the right of the control.

MiddleLeft

The icon appears aligned with the middle of the control and the left of the control.

MiddleRight

The icon appears aligned with the middle of the control and the right of the control.

TopLeft

The icon appears aligned with the top of the control and to the left of the control.

TopRight

The 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
Available since 1.1
Return to top
Show: