Spread Windows Forms 9.0 Product Documentation
Increment Property
Example 


Gets or sets the increment offset of a single spin behavior.
Syntax
'Declaration
 
Public Property Increment As Integer
'Usage
 
Dim instance As Spin
Dim value As Integer
 
instance.Increment = value
 
value = instance.Increment
public int Increment {get; set;}

Property Value

An int value, that indicates the increment offset of the spin behavior.
Example
This example sets the Increment property.
GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo testbutton = new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo();
testbutton.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown;
testbutton.BackColor = Color.Red;
testbutton.UseVisualStyleBackColor = false;
GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo testbutton1 = new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo();
testbutton1.BackColor = Color.Green;
testbutton1.UseVisualStyleBackColor = false;
testbutton1.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinUp;
GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType ncell1 = new GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType();
//Clears other buttons including the calculator button
ncell1.SideButtons.Clear();
ncell1.SideButtons.Add(testbutton);
ncell1.SideButtons.Add(testbutton1);
ncell1.Spin.AllowSpin = true;
ncell1.Spin.IncrementValue = 1;           
ncell1.Spin.SpinMode = GrapeCity.Win.Spread.InputMan.CellType.NumberSpinMode.Value;          
fpSpread1.Sheets[0].Cells[1, 1].CellType = ncell1;
fpSpread1.ActiveSheet.Cells[1, 1].Value = 12.31;
Dim testbutton As New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo()
testbutton.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown
testbutton.BackColor = Color.Red
testbutton.UseVisualStyleBackColor = False
Dim testbutton1 As New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo()
testbutton1.BackColor = Color.Green
testbutton1.UseVisualStyleBackColor = False
testbutton1.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinUp
Dim ncell1 As New GrapeCity.Win.Spread.InputMan.CellType.GcNumberCellType()
'Clears other buttons including the calculator button
ncell1.SideButtons.Clear()
ncell1.SideButtons.Add(testbutton)
ncell1.SideButtons.Add(testbutton1)
ncell1.Spin.AllowSpin = True
ncell1.Spin.IncrementValue = 1
ncell1.Spin.SpinMode = GrapeCity.Win.Spread.InputMan.CellType.NumberSpinMode.Value
FpSpread1.Sheets(0).Cells(1, 1).CellType = ncell1
FpSpread1.ActiveSheet.Cells(1, 1).Value = 12.31
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

Spin Class
Spin Members

 

 


Copyright © GrapeCity, inc. All rights reserved.