Spread Windows Forms 7.0 Product Documentation
ResetNoteIndicatorColor Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > NamedStyle Class : ResetNoteIndicatorColor Method


Glossary Item Box

Resets to its default value the color of the note indicator for the style.

Syntax

Visual Basic (Declaration) 
Public Overrides Sub ResetNoteIndicatorColor() 
Visual Basic (Usage)Copy Code
Dim instance As NamedStyle
 
instance.ResetNoteIndicatorColor()
C# 
public override void ResetNoteIndicatorColor()

Example

This example resets several properties to their default values.
C#Copy Code
DialogResult dlg; 
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData", "DataAreaDefault");
ns.BackColor = Color.LightBlue;
ns.Border = new FarPoint.Win.LineBorder(Color.DarkBlue, 2);
ns.CanFocus = true;
ns.CellType = new FarPoint.Win.Spread.CellType.TextCellType();
ns.Editor = new FarPoint.Win.Spread.CellType.TextCellType();
ns.Font = new Font("Comic Sans Serif", 12);
ns.ForeColor = Color.Red;
ns.Formatter = new FarPoint.Win.Spread.CellType.TextCellType();
ns.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
ns.Locked = true;
ns.Name = "StyleData";
ns.NoteIndicatorColor =  Color.Green;
ns.Parent = "DataAreaDefault";
ns.Renderer = new FarPoint.Win.Spread.CellType.TextCellType();
ns.TabStop = true;
ns.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Bottom;
fpSpread1.NamedStyles.Add(ns);
fpSpread1.ActiveSheet.Cells[0, 0].StyleName = "StyleData";
fpSpread1.ActiveSheet.SetText(0, 0, "NamedStyle");
fpSpread1.ActiveSheet.Columns[0].Width = 120;
fpSpread1.ActiveSheet.Rows[0].Height = 80;
dlg = MessageBox.Show("Do you want to reset the named style?", "Reset", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
      ns.ResetBackColor();
      ns.ResetBorder();
      ns.ResetCanFocus();
      ns.ResetCellType();
      ns.ResetEditor();
      ns.ResetFont();
      ns.ResetForeColor();
      ns.ResetFormatter();
      ns.ResetHorizontalAlignment();
      ns.ResetLocked();
      ns.NoteIndicatorColor();
      ns.ResetParent();
      ns.ResetProperty(FarPoint.Win.Spread.SheetStyleProperty.VerticalAlignment);
      ns.ResetRenderer();
      ns.TabStop();
      ns.ResetVerticalAlignment();
}
Visual BasicCopy Code
Dim dlg As DialogResult
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData", "DataAreaDefault")
ns.BackColor = Color.LightBlue
ns.Border = New FarPoint.Win.LineBorder(Color.DarkBlue, 2)
ns.CanFocus = True
ns.CellType = New FarPoint.Win.Spread.CellType.TextCellType()
ns.Editor = New FarPoint.Win.Spread.CellType.TextCellType()
ns.Font = New Font("Comic Sans Serif", 12)
ns.ForeColor = Color.Red
ns.Formatter = New FarPoint.Win.Spread.CellType.TextCellType()
ns.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
ns.Locked = True
ns.Name = "StyleData"
ns.NoteIndicatorColor = Color.Green
ns.Parent = "DataAreaDefault"
ns.Renderer = New FarPoint.Win.Spread.CellType.TextCellType()
ns.TabStop = True
ns.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Bottom
FpSpread1.NamedStyles.Add(ns)
FpSpread1.ActiveSheet.Cells(0, 0).StyleName = "StyleData"
FpSpread1.ActiveSheet.SetText(0, 0, "NamedStyle")
FpSpread1.ActiveSheet.Columns(0).Width = 120
FpSpread1.ActiveSheet.Rows(0).Height = 80
dlg = MessageBox.Show("Do you want to reset the named style?", "Reset", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
      ns.ResetBackColor()
      ns.ResetBorder()
      ns.ResetCanFocus()
      ns.ResetCellType()
      ns.ResetEditor()
      ns.ResetFont()
      ns.ResetForeColor()
      ns.ResetFormatter()
      ns.ResetHorizontalAlignment()
      ns.ResetLocked()
      ns.ResetNoteIndicatorColor()
      ns.ResetParent()
      ns.ResetProperty(FarPoint.Win.Spread.SheetStyleProperty.VerticalAlignment)
      ns.ResetRenderer()
      ns.TabStop()
      ns.ResetVerticalAlignment()
End If

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.