Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Customizing Interaction with Cell Types > Understanding Additional Features of Cell Types > Displaying Spin Buttons |
In some cell types, you can display spin buttons, to let users change the value in a cell quickly. Spin buttons are a set of two arrow buttons that appear together, one for increasing the value and one for decreasing the value. Here is a picture of spin buttons on the right-hand side of a number cell. They appear when the cell is in edit mode.
You specify how much the value changes when the user clicks a spin button and you determine whether the value wraps when the minimum or maximum value is reached.
Spin buttons can be displayed in:
For the numeric cell types, if the cursor is left of the decimal point, the spin button increments the value using the whole number. If the cursor is to the right, the spin button increments the value using the first, or tenths, decimal place. For the date-time cell type, the day, month, year, etc. are incremented or decremented depending on which part of the date and time the cursor is in. The spin buttons expand vertically the entire height of the cell, so the taller the cell, the bigger the spin buttons. The properties of the Currency, Number, and Percent cell types that relate to spin buttons are listed below. The Date-Time cell type has only the SpinButton property.
Property |
Description |
---|---|
SpinButton |
Sets whether a spin button is displayed when editing. |
SpinDecimalIncrement |
Sets the amount by which the value increments when using the spin buttons and the cursor is in the decimal portion. |
SpinIntegerIncrement |
Sets the amount by which the value increments when using the spin buttons and the cursor is in the integer portion. |
SpinWrap |
Sets whether the value wraps when the minimum or maximum is reached. |
For more information refer to the property for each cell type:
For information on the editable cell types, refer to Working with Editable Cell Types.
For information on other features of cell types, refer to Understanding Additional Features of Cell Types.
Or right-click on the cell or cells and select Cell Type. From the list, select the cell type. In the CellType editor, set the properties you need. Click Apply.