public class SpinButtonActiveXControl extends ActiveXControl
Example
//Initialize a new workbook.
Workbook book = new Workbook();
//Add a ToggleButtonActiveXControl.
Shape shape = book.getWorksheets().get(0).getShapes().addActiveXControl(ControlType.SPIN_BUTTON, 1, 0, 1, 0, 100, 50);
SpinButtonActiveXControl activeXControl = (SpinButtonActiveXControl)shape.getActiveXControl();
//do your business
//Save the excel file.
book.save("exmaple.xlsx");
| Modifier and Type | Method and Description |
|---|---|
int |
getMax()
Gets the maximum acceptable value.
|
int |
getMin()
Gets the minimum acceptable value.
|
int |
getOrientation()
Gets whether the SpinButton or ScrollBar is oriented vertically or horizontally.
|
int |
getPosition()
Gets the value.
|
int |
getSmallChange()
Gets the amount by which the Position property changes
|
int |
getType()
Gets the type of the ActiveX control.
|
void |
setMax(int value)
Sets the maximum acceptable value.
|
void |
setMin(int value)
Sets the minimum acceptable value.
|
void |
setOrientation(int value)
Sets whether the SpinButton or ScrollBar is oriented vertically or horizontally.
|
void |
setPosition(int value)
Sets the value.
|
void |
setSmallChange(int value)
Sets the amount by which the Position property changes
|
getData, getFont, getIMEMode, getTextAlign, isAutoSize, isEnabled, isLocked, isTransparent, setAutoSize, setEnabled, setIMEMode, setLocked, setTextAlign, setTransparentgetBackOleColor, getForeOleColor, getHeight, getLinkedCell, getListFillRange, getMouseIcon, getMousePointer, getShadow, getWidth, getWorkbook, isVisible, setBackOleColor, setForeOleColor, setHeight, setLinkedCell, setListFillRange, setMouseIcon, setMousePointer, setShadow, setVisible, setWidthpublic int getType()
See ControlType.
Example
if(activeXControl.getType() == com.aspose.cells.ControlType.SPIN_BUTTON)
{
//do something
}
getType in class ActiveXControlBasepublic int getMin()
Example
activeXControl.setMin(0);
public void setMin(int value)
public int getMax()
Example
activeXControl.setMax(100);
public void setMax(int value)
public int getPosition()
Example
activeXControl.setPosition(30);
public void setPosition(int value)
public int getSmallChange()
Example
activeXControl.setSmallChange(5);
public void setSmallChange(int value)
public int getOrientation()
Example
if(activeXControl.getOrientation() == com.aspose.cells.ControlScrollOrientation.AUTO)
{
activeXControl.setOrientation(com.aspose.cells.ControlScrollOrientation.HORIZONTAL);
}
public void setOrientation(int value)
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.