TextBoxActiveXControl
Inheritance: java.lang.Object, com.aspose.cells.ActiveXControlBase, com.aspose.cells.ActiveXControl
public class TextBoxActiveXControl extends ActiveXControl
Represents a text box ActiveX control.
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");
Methods
Method | Description |
---|---|
equals(Object arg0) | |
getBackOleColor() | Gets the ole color of the background. |
getBorderOleColor() | Gets the ole color of the background. |
getBorderStyle() | Gets the type of border used by the control. |
getClass() | |
getData() | Gets the binary data of the control. |
getDropButtonStyle() | Specifies the symbol displayed on the drop button |
getEnterFieldBehavior() | Specifies selection behavior when entering the control. |
getEnterKeyBehavior() | Specifies the behavior of the ENTER key. |
getFont() | Represents the font of the control. |
getForeOleColor() | Gets the ole color of the foreground. |
getHeight() | Gets the height of the control in unit of points. |
getHideSelection() | Indicates whether selected text in the control appears highlighted when the control does not have focus. |
getIMEMode() | Gets the default run-time mode of the Input Method Editor for the control as it receives focus. |
getIntegralHeight() | Indicates whether the control will only show complete lines of text without showing any partial lines. |
getLinkedCell() | Gets the linked cell. |
getListFillRange() | Gets the list fill range. |
getMaxLength() | Gets the maximum number of characters |
getMouseIcon() | Gets a custom icon to display as the mouse pointer for the control. |
getMousePointer() | Gets the type of icon displayed as the mouse pointer for the control. |
getPasswordChar() | Gets a character to be displayed in place of the characters entered. |
getScrollBars() | Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither. |
getShadow() | Indicates whether to show a shadow. |
getShowDropButtonTypeWhen() | Specifies the symbol displayed on the drop button |
getSpecialEffect() | Gets the special effect of the control. |
getTabKeyBehavior() | Indicates whether tab characters are allowed in the text of the control. |
getText() | Gets text of the control. |
getTextAlign() | Represents how to align the text used by the control. |
getType() | Gets the type of the ActiveX control. |
getWidth() | Gets the width of the control in unit of points. |
getWorkbook() | Gets the Workbook object. |
hashCode() | |
isAutoSize() | Indicates whether the control will automatically resize to display its entire contents. |
isAutoTab() | Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters. |
isAutoWordSelected() | Specifies the basic unit used to extend a selection. |
isDragBehaviorEnabled() | Indicates whether dragging and dropping is enabled for the control. |
isEditable() | Indicates whether the user can type into the control. |
isEnabled() | Indicates whether the control can receive the focus and respond to user-generated events. |
isLocked() | Indicates whether data in the control is locked for editing. |
isMultiLine() | Indicates whether the control can display more than one line of text. |
isTransparent() | Indicates whether the control is transparent. |
isVisible() | Indicates whether this control is visible. |
isWordWrapped() | Indicates whether the contents of the control automatically wrap at the end of a line. |
notify() | |
notifyAll() | |
setAutoSize(boolean value) | Indicates whether the control will automatically resize to display its entire contents. |
setAutoTab(boolean value) | Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters. |
setAutoWordSelected(boolean value) | Specifies the basic unit used to extend a selection. |
setBackOleColor(int value) | Sets the ole color of the background. |
setBorderOleColor(int value) | Sets the ole color of the background. |
setBorderStyle(int value) | Sets the type of border used by the control. |
setDragBehaviorEnabled(boolean value) | Indicates whether dragging and dropping is enabled for the control. |
setDropButtonStyle(int value) | Specifies the symbol displayed on the drop button |
setEditable(boolean value) | Indicates whether the user can type into the control. |
setEnabled(boolean value) | Indicates whether the control can receive the focus and respond to user-generated events. |
setEnterFieldBehavior(boolean value) | Specifies selection behavior when entering the control. |
setEnterKeyBehavior(boolean value) | Specifies the behavior of the ENTER key. |
setForeOleColor(int value) | Sets the ole color of the foreground. |
setHeight(double value) | Sets the height of the control in unit of points. |
setHideSelection(boolean value) | Indicates whether selected text in the control appears highlighted when the control does not have focus. |
setIMEMode(int value) | Sets the default run-time mode of the Input Method Editor for the control as it receives focus. |
setIntegralHeight(boolean value) | Indicates whether the control will only show complete lines of text without showing any partial lines. |
setLinkedCell(String value) | Sets the linked cell. |
setListFillRange(String value) | Sets the list fill range. |
setLocked(boolean value) | Indicates whether data in the control is locked for editing. |
setMaxLength(int value) | Sets the maximum number of characters |
setMouseIcon(byte[] value) | Sets a custom icon to display as the mouse pointer for the control. |
setMousePointer(int value) | Sets the type of icon displayed as the mouse pointer for the control. |
setMultiLine(boolean value) | Indicates whether the control can display more than one line of text. |
setPasswordChar(char value) | Sets a character to be displayed in place of the characters entered. |
setScrollBars(int value) | Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither. |
setShadow(boolean value) | Indicates whether to show a shadow. |
setShowDropButtonTypeWhen(int value) | Specifies the symbol displayed on the drop button |
setSpecialEffect(int value) | Sets the special effect of the control. |
setTabKeyBehavior(boolean value) | Indicates whether tab characters are allowed in the text of the control. |
setText(String value) | Sets text of the control. |
setTextAlign(int value) | Represents how to align the text used by the control. |
setTransparent(boolean value) | Indicates whether the control is transparent. |
setVisible(boolean value) | Indicates whether this control is visible. |
setWidth(double value) | Sets the width of the control in unit of points. |
setWordWrapped(boolean value) | Indicates whether the contents of the control automatically wrap at the end of a line. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getBackOleColor()
public int getBackOleColor()
Gets the ole color of the background.
Returns: int
getBorderOleColor()
public int getBorderOleColor()
Gets the ole color of the background.
Example
//excel default color system 12 or green(0x0000FF00)
activeXControl.setBorderOleColor(/*unchecked*/((int)0x80000012L));
Returns: int
getBorderStyle()
public int getBorderStyle()
Gets the type of border used by the control.
See ControlBorderType.
Example
activeXControl.setBorderStyle(com.aspose.cells.ControlBorderType.SINGLE);
Returns: int
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getData()
public byte[] getData()
Gets the binary data of the control.
Returns: byte[]
getDropButtonStyle()
public int getDropButtonStyle()
Specifies the symbol displayed on the drop button
See DropButtonStyle.
Example
activeXControl.setDropButtonStyle(com.aspose.cells.DropButtonStyle.ARROW);
Returns: int
getEnterFieldBehavior()
public boolean getEnterFieldBehavior()
Specifies selection behavior when entering the control. True specifies that the selection remains unchanged from last time the control was active. False specifies that all the text in the control will be selected when entering the control.
Example
if(!activeXControl.getEnterFieldBehavior())
{
activeXControl.setEnterFieldBehavior(true);
}
Returns: boolean
getEnterKeyBehavior()
public boolean getEnterKeyBehavior()
Specifies the behavior of the ENTER key. True specifies that pressing ENTER will create a new line. False specifies that pressing ENTER will move the focus to the next object in the tab order.
Example
if(!activeXControl.getEnterKeyBehavior())
{
activeXControl.setEnterKeyBehavior(true);
}
Returns: boolean
getFont()
public Font getFont()
Represents the font of the control.
Returns: Font
getForeOleColor()
public int getForeOleColor()
Gets the ole color of the foreground.
Remarks
Not applies to Image control.
Returns: int
getHeight()
public double getHeight()
Gets the height of the control in unit of points.
Returns: double
getHideSelection()
public boolean getHideSelection()
Indicates whether selected text in the control appears highlighted when the control does not have focus.
Example
if(!activeXControl.getHideSelection())
{
activeXControl.setHideSelection(true);
}
Returns: boolean
getIMEMode()
public int getIMEMode()
Gets the default run-time mode of the Input Method Editor for the control as it receives focus.
Returns: int
getIntegralHeight()
public boolean getIntegralHeight()
Indicates whether the control will only show complete lines of text without showing any partial lines.
Example
if(!activeXControl.getIntegralHeight())
{
activeXControl.setIntegralHeight(true);
}
Returns: boolean
getLinkedCell()
public String getLinkedCell()
Gets the linked cell.
Returns: java.lang.String
getListFillRange()
public String getListFillRange()
Gets the list fill range.
Returns: java.lang.String
getMaxLength()
public int getMaxLength()
Gets the maximum number of characters
Example
if(activeXControl.getMaxLength() == 0)
{
activeXControl.setMaxLength(30);
}
Returns: int
getMouseIcon()
public byte[] getMouseIcon()
Gets a custom icon to display as the mouse pointer for the control.
Returns: byte[]
getMousePointer()
public int getMousePointer()
Gets the type of icon displayed as the mouse pointer for the control.
Returns: int
getPasswordChar()
public char getPasswordChar()
Gets a character to be displayed in place of the characters entered.
Example
activeXControl.setPasswordChar('a');
Returns: char
getScrollBars()
public int getScrollBars()
Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither.
See ControlScrollBarType.
Example
activeXControl.setScrollBars(com.aspose.cells.ControlScrollBarType.BARS_VERTICAL);
Returns: int
getShadow()
public boolean getShadow()
Indicates whether to show a shadow.
Returns: boolean
getShowDropButtonTypeWhen()
public int getShowDropButtonTypeWhen()
Specifies the symbol displayed on the drop button
See ShowDropButtonType.
Example
activeXControl.setShowDropButtonTypeWhen(com.aspose.cells.ShowDropButtonType.FOCUS);
Returns: int
getSpecialEffect()
public int getSpecialEffect()
Gets the special effect of the control.
Example
activeXControl.setSpecialEffect(com.aspose.cells.ControlSpecialEffectType.BUMP);
Returns: int
getTabKeyBehavior()
public boolean getTabKeyBehavior()
Indicates whether tab characters are allowed in the text of the control.
Example
if(!activeXControl.getTabKeyBehavior())
{
activeXControl.setTabKeyBehavior(true);
}
Returns: boolean
getText()
public String getText()
Gets text of the control.
Example
activeXControl.setText("This is a test.");
Returns: java.lang.String
getTextAlign()
public int getTextAlign()
Represents how to align the text used by the control.
See TextAlignmentType.
Returns: int
getType()
public int getType()
Gets the type of the ActiveX control.
See ControlType.
Example
/*Aspose.Cells.Drawing.ActiveXControls.ControlType*/int type = activeXControl.getType();
Returns: int
getWidth()
public double getWidth()
Gets the width of the control in unit of points.
Returns: double
getWorkbook()
public Workbook getWorkbook()
Gets the Workbook object.
Returns: Workbook
hashCode()
public native int hashCode()
Returns: int
isAutoSize()
public boolean isAutoSize()
Indicates whether the control will automatically resize to display its entire contents.
Returns: boolean
isAutoTab()
public boolean isAutoTab()
Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters.
Example
if(!activeXControl.isAutoTab())
{
activeXControl.setAutoTab(true);
}
Returns: boolean
isAutoWordSelected()
public boolean isAutoWordSelected()
Specifies the basic unit used to extend a selection. True specifies that the basic unit is a single character. false specifies that the basic unit is a whole word.
Example
if(!activeXControl.isAutoWordSelected())
{
activeXControl.setAutoWordSelected(true);
}
Returns: boolean
isDragBehaviorEnabled()
public boolean isDragBehaviorEnabled()
Indicates whether dragging and dropping is enabled for the control.
Example
if(!activeXControl.isDragBehaviorEnabled())
{
activeXControl.setDragBehaviorEnabled(true);
}
Returns: boolean
isEditable()
public boolean isEditable()
Indicates whether the user can type into the control.
Example
if(!activeXControl.isEditable())
{
activeXControl.setEditable(true);
}
Returns: boolean
isEnabled()
public boolean isEnabled()
Indicates whether the control can receive the focus and respond to user-generated events.
Returns: boolean
isLocked()
public boolean isLocked()
Indicates whether data in the control is locked for editing.
Returns: boolean
isMultiLine()
public boolean isMultiLine()
Indicates whether the control can display more than one line of text.
Example
if(!activeXControl.isMultiLine())
{
activeXControl.setMultiLine(true);
}
Returns: boolean
isTransparent()
public boolean isTransparent()
Indicates whether the control is transparent.
Returns: boolean
isVisible()
public boolean isVisible()
Indicates whether this control is visible.
Returns: boolean
isWordWrapped()
public boolean isWordWrapped()
Indicates whether the contents of the control automatically wrap at the end of a line.
Example
if(!activeXControl.isWordWrapped())
{
activeXControl.setWordWrapped(true);
}
Returns: boolean
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAutoSize(boolean value)
public void setAutoSize(boolean value)
Indicates whether the control will automatically resize to display its entire contents.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setAutoTab(boolean value)
public void setAutoTab(boolean value)
Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setAutoWordSelected(boolean value)
public void setAutoWordSelected(boolean value)
Specifies the basic unit used to extend a selection. True specifies that the basic unit is a single character. false specifies that the basic unit is a whole word.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setBackOleColor(int value)
public void setBackOleColor(int value)
Sets the ole color of the background.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setBorderOleColor(int value)
public void setBorderOleColor(int value)
Sets the ole color of the background.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setBorderStyle(int value)
public void setBorderStyle(int value)
Sets the type of border used by the control.
See ControlBorderType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setDragBehaviorEnabled(boolean value)
public void setDragBehaviorEnabled(boolean value)
Indicates whether dragging and dropping is enabled for the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setDropButtonStyle(int value)
public void setDropButtonStyle(int value)
Specifies the symbol displayed on the drop button
See DropButtonStyle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setEditable(boolean value)
public void setEditable(boolean value)
Indicates whether the user can type into the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setEnabled(boolean value)
public void setEnabled(boolean value)
Indicates whether the control can receive the focus and respond to user-generated events.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setEnterFieldBehavior(boolean value)
public void setEnterFieldBehavior(boolean value)
Specifies selection behavior when entering the control. True specifies that the selection remains unchanged from last time the control was active. False specifies that all the text in the control will be selected when entering the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setEnterKeyBehavior(boolean value)
public void setEnterKeyBehavior(boolean value)
Specifies the behavior of the ENTER key. True specifies that pressing ENTER will create a new line. False specifies that pressing ENTER will move the focus to the next object in the tab order.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setForeOleColor(int value)
public void setForeOleColor(int value)
Sets the ole color of the foreground.
Remarks
Not applies to Image control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setHeight(double value)
public void setHeight(double value)
Sets the height of the control in unit of points.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
setHideSelection(boolean value)
public void setHideSelection(boolean value)
Indicates whether selected text in the control appears highlighted when the control does not have focus.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setIMEMode(int value)
public void setIMEMode(int value)
Sets the default run-time mode of the Input Method Editor for the control as it receives focus.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setIntegralHeight(boolean value)
public void setIntegralHeight(boolean value)
Indicates whether the control will only show complete lines of text without showing any partial lines.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setLinkedCell(String value)
public void setLinkedCell(String value)
Sets the linked cell.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setListFillRange(String value)
public void setListFillRange(String value)
Sets the list fill range.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setLocked(boolean value)
public void setLocked(boolean value)
Indicates whether data in the control is locked for editing.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setMaxLength(int value)
public void setMaxLength(int value)
Sets the maximum number of characters
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setMouseIcon(byte[] value)
public void setMouseIcon(byte[] value)
Sets a custom icon to display as the mouse pointer for the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte[] |
setMousePointer(int value)
public void setMousePointer(int value)
Sets the type of icon displayed as the mouse pointer for the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setMultiLine(boolean value)
public void setMultiLine(boolean value)
Indicates whether the control can display more than one line of text.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setPasswordChar(char value)
public void setPasswordChar(char value)
Sets a character to be displayed in place of the characters entered.
Parameters:
Parameter | Type | Description |
---|---|---|
value | char |
setScrollBars(int value)
public void setScrollBars(int value)
Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither.
See ControlScrollBarType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setShadow(boolean value)
public void setShadow(boolean value)
Indicates whether to show a shadow.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowDropButtonTypeWhen(int value)
public void setShowDropButtonTypeWhen(int value)
Specifies the symbol displayed on the drop button
See ShowDropButtonType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setSpecialEffect(int value)
public void setSpecialEffect(int value)
Sets the special effect of the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setTabKeyBehavior(boolean value)
public void setTabKeyBehavior(boolean value)
Indicates whether tab characters are allowed in the text of the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setText(String value)
public void setText(String value)
Sets text of the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setTextAlign(int value)
public void setTextAlign(int value)
Represents how to align the text used by the control.
See TextAlignmentType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setTransparent(boolean value)
public void setTransparent(boolean value)
Indicates whether the control is transparent.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setVisible(boolean value)
public void setVisible(boolean value)
Indicates whether this control is visible.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setWidth(double value)
public void setWidth(double value)
Sets the width of the control in unit of points.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
setWordWrapped(boolean value)
public void setWordWrapped(boolean value)
Indicates whether the contents of the control automatically wrap at the end of a line.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |