Spread Windows Forms 6.0 Product Documentation
SpinButton Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > DateTimeCellType Class : SpinButton Property


Glossary Item Box

Gets or sets whether a spin button is displayed while editing.

Syntax

Visual Basic (Declaration) 
Public Property SpinButton As Boolean
Visual Basic (Usage)Copy Code
Dim instance As DateTimeCellType
Dim value As Boolean
 
instance.SpinButton = value
 
value = instance.SpinButton
C# 
public bool SpinButton {get; set;}

Property Value

Boolean: true if spin buttons are displayed; false otherwise

Example

This example sets up a cell on the first sheet as a date-time cell and specifies some of the properties available.
C#Copy Code
FarPoint.Win.Spread.CellType.DateTimeCellType datecell = new FarPoint.Win.Spread.CellType.DateTimeCellType();
datecell.AMString = "a.m. (morning)";
datecell.PMString = "p.m. (evening)";
datecell.DateSeparator = " | ";
datecell.TimeSeparator = ":";
datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime;
datecell.MaximumDate = new System.DateTime(2010, 1, 1);
datecell.MinimumDate = new System.DateTime(1990, 12, 31);
datecell.MaximumTime = new System.TimeSpan(15, 59, 59);
datecell.MinimumTime = new System.TimeSpan(11, 0, 0);
datecell.SpinButton = true;
fpSpread1.Sheets[0].Cells[7,2].CellType = datecell;
fpSpread1.Sheets[0].Cells[7,2].Value = System.DateTime.Now;
Visual BasicCopy Code
Dim datecell As New FarPoint.Win.Spread.CellType.DateTimeCellType()
datecell.AMString = "a.m. (morning)"
datecell.PMString = "p.m. (evening)"
datecell.DateSeparator = " | "
datecell.TimeSeparator = ":"
datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime
datecell.MaximumDate = new System.DateTime(2010, 1, 1)
datecell.MinimumDate = new System.DateTime(1990, 12, 31)
datecell.MaximumTime = new System.TimeSpan(15, 59, 59)
datecell.MinimumTime = new System.TimeSpan(11, 0, 0)
datecell.SpinButton = True
fpSpread1.Sheets(0).Cells(7,2).CellType = datecell
fpSpread1.Sheets(0).Cells(7,2).Value = System.DateTime.Now

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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