public class TextBoxActiveXControl extends ActiveXControl
Example
//Initialize a new workbook.
Workbook book = new Workbook();
//Add a TextBoxActiveXControl.
Shape shape = book.getWorksheets().get(0).getShapes().addActiveXControl(ControlType.TEXT_BOX, 1, 0, 1, 0, 100, 50);
TextBoxActiveXControl activeXControl = (TextBoxActiveXControl)shape.getActiveXControl();
//do your business
//Save the excel file.
book.save("exmaple.xlsx");
| Modifier and Type | Method and Description |
|---|---|
int |
getBorderOleColor()
Gets the ole color of the background.
|
int |
getBorderStyle()
Gets the type of border used by the control.
|
int |
getDropButtonStyle()
Specifies the symbol displayed on the drop button
|
boolean |
getEnterFieldBehavior()
Specifies selection behavior when entering the control.
|
boolean |
getEnterKeyBehavior()
Specifies the behavior of the ENTER key.
|
boolean |
getHideSelection()
Indicates whether selected text in the control appears highlighted when the control does not have focus.
|
boolean |
getIntegralHeight()
Indicates whether the control will only show complete lines of text without showing any partial lines.
|
int |
getMaxLength()
Gets the maximum number of characters
|
char |
getPasswordChar()
Gets a character to be displayed in place of the characters entered.
|
int |
getScrollBars()
Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither.
|
int |
getShowDropButtonTypeWhen()
Specifies the symbol displayed on the drop button
|
int |
getSpecialEffect()
Gets the special effect of the control.
|
boolean |
getTabKeyBehavior()
Indicates whether tab characters are allowed in the text of the control.
|
java.lang.String |
getText()
Gets text of the control.
|
int |
getType()
Gets the type of the ActiveX control.
|
boolean |
isAutoTab()
Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters.
|
boolean |
isAutoWordSelected()
Specifies the basic unit used to extend a selection.
|
boolean |
isDragBehaviorEnabled()
Indicates whether dragging and dropping is enabled for the control.
|
boolean |
isEditable()
Indicates whether the user can type into the control.
|
boolean |
isMultiLine()
Indicates whether the control can display more than one line of text.
|
boolean |
isWordWrapped()
Indicates whether the contents of the control automatically wrap at the end of a line.
|
void |
setAutoTab(boolean value)
Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters.
|
void |
setAutoWordSelected(boolean value)
Specifies the basic unit used to extend a selection.
|
void |
setBorderOleColor(int value)
Sets the ole color of the background.
|
void |
setBorderStyle(int value)
Sets the type of border used by the control.
|
void |
setDragBehaviorEnabled(boolean value)
Indicates whether dragging and dropping is enabled for the control.
|
void |
setDropButtonStyle(int value)
Specifies the symbol displayed on the drop button
|
void |
setEditable(boolean value)
Indicates whether the user can type into the control.
|
void |
setEnterFieldBehavior(boolean value)
Specifies selection behavior when entering the control.
|
void |
setEnterKeyBehavior(boolean value)
Specifies the behavior of the ENTER key.
|
void |
setHideSelection(boolean value)
Indicates whether selected text in the control appears highlighted when the control does not have focus.
|
void |
setIntegralHeight(boolean value)
Indicates whether the control will only show complete lines of text without showing any partial lines.
|
void |
setMaxLength(int value)
Sets the maximum number of characters
|
void |
setMultiLine(boolean value)
Indicates whether the control can display more than one line of text.
|
void |
setPasswordChar(char value)
Sets a character to be displayed in place of the characters entered.
|
void |
setScrollBars(int value)
Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither.
|
void |
setShowDropButtonTypeWhen(int value)
Specifies the symbol displayed on the drop button
|
void |
setSpecialEffect(int value)
Sets the special effect of the control.
|
void |
setTabKeyBehavior(boolean value)
Indicates whether tab characters are allowed in the text of the control.
|
void |
setText(java.lang.String value)
Sets text of the control.
|
void |
setWordWrapped(boolean value)
Indicates whether the contents of the control automatically wrap at the end of a line.
|
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
/*Aspose.Cells.Drawing.ActiveXControls.ControlType*/int type = activeXControl.getType();
getType in class ActiveXControlBasepublic int getBorderStyle()
See ControlBorderType.
Example
activeXControl.setBorderStyle(com.aspose.cells.ControlBorderType.SINGLE);
public void setBorderStyle(int value)
See ControlBorderType.
public int getBorderOleColor()
Example
//excel default color system 12 or green(0x0000FF00)
activeXControl.setBorderOleColor(/*unchecked*/((int)0x80000012L));
public void setBorderOleColor(int value)
public int getSpecialEffect()
Example
activeXControl.setSpecialEffect(com.aspose.cells.ControlSpecialEffectType.BUMP);
public void setSpecialEffect(int value)
public int getMaxLength()
Example
if(activeXControl.getMaxLength() == 0)
{
activeXControl.setMaxLength(30);
}
public void setMaxLength(int value)
public int getScrollBars()
See ControlScrollBarType.
Example
activeXControl.setScrollBars(com.aspose.cells.ControlScrollBarType.BARS_VERTICAL);
public void setScrollBars(int value)
See ControlScrollBarType.
public char getPasswordChar()
Example
activeXControl.setPasswordChar('a');
public void setPasswordChar(char value)
public boolean isEditable()
Example
if(!activeXControl.isEditable())
{
activeXControl.setEditable(true);
}
public void setEditable(boolean value)
public boolean getIntegralHeight()
Example
if(!activeXControl.getIntegralHeight())
{
activeXControl.setIntegralHeight(true);
}
public void setIntegralHeight(boolean value)
public boolean isDragBehaviorEnabled()
Example
if(!activeXControl.isDragBehaviorEnabled())
{
activeXControl.setDragBehaviorEnabled(true);
}
public void setDragBehaviorEnabled(boolean value)
public boolean getEnterKeyBehavior()
Example
if(!activeXControl.getEnterKeyBehavior())
{
activeXControl.setEnterKeyBehavior(true);
}
public void setEnterKeyBehavior(boolean value)
public boolean getEnterFieldBehavior()
Example
if(!activeXControl.getEnterFieldBehavior())
{
activeXControl.setEnterFieldBehavior(true);
}
public void setEnterFieldBehavior(boolean value)
public boolean getTabKeyBehavior()
Example
if(!activeXControl.getTabKeyBehavior())
{
activeXControl.setTabKeyBehavior(true);
}
public void setTabKeyBehavior(boolean value)
public boolean getHideSelection()
Example
if(!activeXControl.getHideSelection())
{
activeXControl.setHideSelection(true);
}
public void setHideSelection(boolean value)
public boolean isAutoTab()
Example
if(!activeXControl.isAutoTab())
{
activeXControl.setAutoTab(true);
}
public void setAutoTab(boolean value)
public boolean isMultiLine()
Example
if(!activeXControl.isMultiLine())
{
activeXControl.setMultiLine(true);
}
public void setMultiLine(boolean value)
public boolean isAutoWordSelected()
Example
if(!activeXControl.isAutoWordSelected())
{
activeXControl.setAutoWordSelected(true);
}
public void setAutoWordSelected(boolean value)
public boolean isWordWrapped()
Example
if(!activeXControl.isWordWrapped())
{
activeXControl.setWordWrapped(true);
}
public void setWordWrapped(boolean value)
public java.lang.String getText()
Example
activeXControl.setText("This is a test.");
public void setText(java.lang.String value)
public int getDropButtonStyle()
See DropButtonStyle.
Example
activeXControl.setDropButtonStyle(com.aspose.cells.DropButtonStyle.ARROW);
public void setDropButtonStyle(int value)
See DropButtonStyle.
public int getShowDropButtonTypeWhen()
See ShowDropButtonType.
Example
activeXControl.setShowDropButtonTypeWhen(com.aspose.cells.ShowDropButtonType.FOCUS);
public void setShowDropButtonTypeWhen(int value)
See ShowDropButtonType.
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.