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


Glossary Item Box

Resets the locked state for the cell and makes the cell inherit the locked state from the default cell.

Syntax

Visual Basic (Declaration) 
Public Sub ResetLocked() 
Visual Basic (Usage)Copy Code
Dim instance As Cell
 
instance.ResetLocked()
C# 
public void ResetLocked()

Example

This example shows the use of this method by resetting the cell properties to their default values.
C#Copy Code
FarPoint.Win.Spread.Cell cell;
cell = fpSpread1.ActiveSheet.Cells[0, 0];
cell.BackColor = Color.LightBlue;
cell.Border = new FarPoint.Win.LineBorder(Color.DarkBlue);
cell.CanFocus = false;
cell.CellType = new FarPoint.Win.Spread.CellType.GeneralCellType();
cell.Font = new Font("Comic Sans MS", 10);
cell.ForeColor = Color.Red;
cell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
cell.Locked = false;
cell.NoteIndicatorColor = Color.Green;
cell.ParentStyleName = "DataAreaDefault";
cell.TabStop = false;
cell.Text = "Test";
cell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top;

private void button1Click(object sender, System.EventArgs e)
{
     FarPoint.Win.Spread.Cell cell;
     cell = fpSpread1.ActiveSheet.Cells[0, 0];
     DialogResult dlg = new DialogResult();
     dlg = MessageBox.Show("Reset the AlternatingRow??", "Reset", MessageBoxButtons.OKCancel);
     if (dlg == DialogResult.OK)
     {
          cell.ResetBackColor();
          cell.ResetBorder();
          cell.ResetCanFocus()
          cell.ResetCellType();
          cell.ResetFont();
          cell.ResetForeColor();
          cell.ResetHorizontalAlignment();
          cell.ResetLocked();
          cell.ResetNoteIndicatorColor();
          cell.ResetNoteStyle();
          cell.ResetParentStyleName();
          cell.ResetTabStop();
          cell.ResetText();
          cell.ResetValue();
          cell.ResetVerticalAlignment();
         }
}
Visual BasicCopy Code
Dim cell As FarPoint.Win.Spread.Cell
cell = FpSpread1.ActiveSheet.Cells(0, 0)
cell.BackColor = Color.LightBlue
cell.Border = New FarPoint.Win.LineBorder(Color.DarkBlue)
cell.CanFocus = False
cell.CellType = New FarPoint.Win.Spread.CellType.GeneralCellType
cell.Font = New Font("Comic Sans MS", 10)
cell.ForeColor = Color.Red
cell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
cell.Locked = False
cell.NoteIndicatorColor = Color.Green
cell.ParentStyleName = "DataAreaDefault"
cell.TabStop = False
cell.Text = "Test"
cell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
     Dim cell As FarPoint.Win.Spread.Cell
     cell = FpSpread1.ActiveSheet.Cells(0, 0)
     Dim dlg As New DialogResult
     dlg = MessageBox.Show("Reset the AlternatingRow??", "Reset", MessageBoxButtons.OKCancel)
     If dlg = DialogResult.OK Then
          cell.ResetBackColor()
          cell.ResetBorder()
          cell.ResetCanFocus()
          cell.ResetCellType()
          cell.ResetFont()
          cell.ResetForeColor()
          cell.ResetHorizontalAlignment()
          cell.ResetLocked()
          cell.ResetNoteIndicatorColor()
          cell.ResetNoteStyle()
          cell.ResetParentStyleName()
          cell.ResetTabStop()
          cell.ResetText()
          cell.ResetValue()
          cell.ResetVerticalAlignment()
     End If
End Sub

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.