Spread Windows Forms 12.0 Product Documentation
GcTimeSpanCellType Constructor()
Example 


GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > GcTimeSpanCellType Class > GcTimeSpanCellType Constructor : GcTimeSpanCellType Constructor()
Initializes a new instance of the GcTimeSpanCellType class.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New GcTimeSpanCellType()
public GcTimeSpanCellType()
Example
This example creates a GcTimeSpan cell.
GrapeCity.Win.Spread.InputMan.CellType.GcTimeSpanCellType gc = new GrapeCity.Win.Spread.InputMan.CellType.GcTimeSpanCellType();
gc.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
gc.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter;

gc.AlternateText.DisplayNull.ForeColor = Color.Red;
gc.AlternateText.DisplayNull.Text = "Display Null";
gc.AlternateText.Null.ForeColor = Color.Red;
gc.AlternateText.Null.Text = "Null value";
gc.AlternateText.DisplayZero.Text = "Display Zero";
gc.AlternateText.DisplayZero.ForeColor = Color.AliceBlue;
gc.AlternateText.Zero.Text = "Zero";
gc.AlternateText.Zero.ForeColor = Color.Azure;

gc.EditMode = GrapeCity.Win.Spread.InputMan.CellType.EditMode.Overwrite;
gc.ExitOnLastChar = true;

gc.Fields.Clear();
gc.Fields.AddRange("d.hh:mm:ss,7,.,,,-,");
gc.DisplayFields.Clear();
gc.DisplayFields.AddRange("d.hh:mm:ss,7,.,,,-,");
gc.DefaultActiveField = gc.Fields[1];

gc.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.FieldsEditorFocusCursorPosition.SelectAll;
gc.MaxMinBehavior = GrapeCity.Win.Spread.InputMan.CellType.MaxMinBehavior.Clear;

gc.NegativeColor = Color.Chocolate;
gc.PaintByControl = true;
gc.ShowRecommendedValue = true;

gc.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SpinButtonInfo());
gc.Spin.AllowSpin = true;
gc.Spin.Increment = 1;
gc.Spin.SpinOnKeys = true;
gc.Spin.SpinOnWheel = true;
gc.Spin.Wrap = true;

gc.UseNegativeColor = true;
gc.ValidateMode = GrapeCity.Win.Spread.InputMan.CellType.ValidateMode.ValidateNone;
gc.ValueSign = GrapeCity.Win.Spread.InputMan.CellType.ValueSignControl.Positive;
gc.UseSpreadDropDownButtonRender = true;

fpSpread1.ActiveSheet.Cells[0, 0].CellType = gc;
Dim GC As New GrapeCity.Win.Spread.InputMan.CellType.GcTimeSpanCellType()
GC.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows
GC.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter

GC.AlternateText.DisplayNull.ForeColor = Color.Red
GC.AlternateText.DisplayNull.Text = "Display Null"
GC.AlternateText.Null.ForeColor = Color.Red
GC.AlternateText.Null.Text = "Null value"
GC.AlternateText.DisplayZero.Text = "Display Zero"
GC.AlternateText.DisplayZero.ForeColor = Color.AliceBlue
GC.AlternateText.Zero.Text = "Zero"
GC.AlternateText.Zero.ForeColor = Color.Azure

GC.EditMode = GrapeCity.Win.Spread.InputMan.CellType.EditMode.Overwrite
GC.ExitOnLastChar = True

GC.Fields.Clear()
GC.Fields.AddRange("d.hh:mm:ss,7,.,,,-,")
GC.DisplayFields.Clear()
GC.DisplayFields.AddRange("d.hh:mm:ss,7,.,,,-,")
GC.DefaultActiveField = GC.Fields(1)

GC.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.FieldsEditorFocusCursorPosition.SelectAll
GC.MaxMinBehavior = GrapeCity.Win.Spread.InputMan.CellType.MaxMinBehavior.Clear

GC.NegativeColor = Color.Chocolate
GC.PaintByControl = True
GC.ShowRecommendedValue = True

GC.SideButtons.Add(New GrapeCity.Win.Spread.InputMan.CellType.SpinButtonInfo())
GC.Spin.AllowSpin = True
GC.Spin.Increment = 1
GC.Spin.SpinOnKeys = True
GC.Spin.SpinOnWheel = True
GC.Spin.Wrap = True

GC.UseNegativeColor = True
GC.ValidateMode = GrapeCity.Win.Spread.InputMan.CellType.ValidateMode.ValidateNone
GC.ValueSign = GrapeCity.Win.Spread.InputMan.CellType.ValueSignControl.Positive
GC.UseSpreadDropDownButtonRender = True

FpSpread1.ActiveSheet.Cells(0, 0).CellType = GC
See Also

Reference

GcTimeSpanCellType Class
GcTimeSpanCellType Members
Overload List