Spread Windows Forms 10.0 Product Documentation
EditBaseCellType Constructor(EditBaseCellType)
Example 


Specified base cell type from which to copy
Copies properties from the specified EditBaseCellType ("copy constructor").
Syntax
'Declaration
 
Public Function New( _
   ByVal g As EditBaseCellType _
)
'Usage
 
Dim g As EditBaseCellType
 
Dim instance As New EditBaseCellType(g)
public EditBaseCellType( 
   EditBaseCellType g
)

Parameters

g
Specified base cell type from which to copy
Example
This example creates a new EditBaseCellType based on a subclass of the object.
public class eb : FarPoint.Win.Spread.CellType.EditBaseCellType
{

public eb()
{
}

public new FarPoint.Win.SuperEdit.AcceptsArrowKeys AcceptsArrowKeys
{
   get
   {
      return base.AcceptsArrowKeys;
   }
   set
   {
      base.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.None;
   }
}
public new FarPoint.Win.Picture BackgroundImage
{
   get
   {
      return base.BackgroundImage;
   }
   set
   {
      base.BackgroundImage = new FarPoint.Win.Picture(Image.FromFile(Application.StartupPath + "\\Trffc14.ico"));
   }
}
}

eb ed = new eb();
ed.BackgroundImage = null;
ed.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.None;
FarPoint.Win.Spread.CellType.EditBaseCellType editor = new FarPoint.Win.Spread.CellType.EditBaseCellType(ed);
fpSpread1.ActiveSheet.Cells[0, 0].CellType = editor;
label1.Text = "The first cell is based on a subclassed EditBaseCellType.  Type something in the first cell and try "+
"to use the arrow keys.  They won't navigate in the cell.";
Public Class eb
Inherits FarPoint.Win.Spread.CellType.EditBaseCellType

Public Sub eb()

End Sub

Public Shadows Property AcceptsArrowKeys() As FarPoint.Win.SuperEdit.AcceptsArrowKeys
   Get
   Return MyBase.AcceptsArrowKeys
   End Get
   Set(ByVal Value As FarPoint.Win.SuperEdit.AcceptsArrowKeys)
   MyBase.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.None
   End Set
End Property

Public Shadows Property BackgroundImage() As FarPoint.Win.Picture
   Get
   Return MyBase.BackgroundImage
   End Get
   Set(ByVal Value As FarPoint.Win.Picture)
   MyBase.BackgroundImage = New FarPoint.Win.Picture(Image.FromFile(Application.StartupPath & "\Trffc14.ico"))
   End Set
End Property

End Class

Dim ed As New eb()
ed.BackgroundImage = Nothing
ed.AcceptsArrowKeys = Nothing
Dim editor As New FarPoint.Win.Spread.CellType.EditBaseCellType(ed)
FpSpread1.ActiveSheet.Cells(0, 0).CellType = editor
Requirements

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

See Also

Reference

EditBaseCellType Class
EditBaseCellType Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.