FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > EditBaseCellType Class > EditBaseCellType Constructor : EditBaseCellType Constructor(EditBaseCellType) |
'Declaration Public Function New( _ ByVal g As EditBaseCellType _ )
'Usage Dim g As EditBaseCellType Dim instance As New EditBaseCellType(g)
public EditBaseCellType( EditBaseCellType g )
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
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8