Spread Windows Forms 12.0 Product Documentation
IconAlignment Property (ThreeStateIconNotify)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > ThreeStateIconNotify Class : IconAlignment Property
Gets or sets the System.Drawing.ContentAlignment of the icon.
Syntax
'Declaration
 
Public Property IconAlignment As ContentAlignment
'Usage
 
Dim instance As ThreeStateIconNotify
Dim value As ContentAlignment
 
instance.IconAlignment = value
 
value = instance.IconAlignment
public ContentAlignment IconAlignment {get; set;}

Property Value

The icon alignment. The default is System.Drawing.ContentAlignment.MiddleRight.
Exceptions
ExceptionDescription
The assigned value is not a valid System.Drawing.ContentAlignment value.
Example
This example uses encoding validation and icon notification.
//Press Alt and type 0176 to enter a non-ASCII character in cell 1,1
FarPoint.Win.Spread.ThreeStateIconNotify three = new FarPoint.Win.Spread.ThreeStateIconNotify();
three.InvalidIcon = new Icon("C:\\Program Files (x86)\\GrapeCity\\spread.ico");
three.ValidIcon = new Icon("C:\\Program Files (x86)\\GrapeCity\\spread1.ico");
three.IconAlignment = ContentAlignment.MiddleRight;
three.InvalidIconTip = "Invalid";
three.ValidIconTip = "ASCII";
FarPoint.Win.Spread.EncodingValidator compare = new FarPoint.Win.Spread.EncodingValidator();
compare.Encoding = System.Text.Encoding.ASCII;
compare.Actions.Add(three);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare);
fpSpread1.Sheets[0].Columns[1].Width = 140;
fpSpread1.Sheets[0].Rows[1].Height = 50;
'Press Alt and type 0176 to enter a non-ASCII character in cell 1,1
Dim three As New FarPoint.Win.Spread.ThreeStateIconNotify()
three.InvalidIcon = New Icon("C:\\Program Files (x86)\\GrapeCity\\spread.ico")
three.ValidIcon = New Icon("C:\\Program Files (x86)\\GrapeCity\\spread1.ico")
three.IconAlignment = ContentAlignment.MiddleRight
three.InvalidIconTip = "Invalid"
three.ValidIconTip = "ASCII"
Dim compare As New FarPoint.Win.Spread.EncodingValidator()
compare.Encoding = System.Text.Encoding.ASCII
compare.Actions.Add(three)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare)
FpSpread1.Sheets(0).Columns(1).Width = 140
FpSpread1.Sheets(0).Rows(1).Height = 50
See Also

Reference

ThreeStateIconNotify Class
ThreeStateIconNotify Members