Class TextBoxActiveXControl

TextBoxActiveXControl class

Represents a text box ActiveX control.

public class TextBoxActiveXControl : ActiveXControl

Properties

NameDescription
virtual BackOleColor { get; set; }Gets and sets the ole color of the background.(Inherited from ActiveXControlBase.)
BorderOleColor { get; set; }Gets and sets the ole color of the background.
BorderStyle { get; set; }Gets and set the type of border used by the control.
override Data { get; }Gets and sets the binary data of the control.(Inherited from ActiveXControl.)
DropButtonStyle { get; set; }Specifies the symbol displayed on the drop button
EnterFieldBehavior { get; set; }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.
EnterKeyBehavior { get; set; }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.
Font { get; }Represents the font of the control.(Inherited from ActiveXControl.)
virtual ForeOleColor { get; set; }Gets and sets the ole color of the foreground.(Inherited from ActiveXControlBase.)
virtual Height { get; set; }Gets and sets the height of the control in unit of points.(Inherited from ActiveXControlBase.)
HideSelection { get; set; }Indicates whether selected text in the control appears highlighted when the control does not have focus.
IMEMode { get; set; }Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.(Inherited from ActiveXControl.)
IntegralHeight { get; set; }Indicates whether the control will only show complete lines of text without showing any partial lines.
virtual IsAutoSize { get; set; }Indicates whether the control will automatically resize to display its entire contents.(Inherited from ActiveXControl.)
IsAutoTab { get; set; }Indicates whether the focus will automatically move to the next control when the user enters the maximum number of characters.
virtual IsAutoWordSelected { get; set; }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.
IsDragBehaviorEnabled { get; set; }Indicates whether dragging and dropping is enabled for the control.
IsEditable { get; set; }Indicates whether the user can type into the control.
IsEnabled { get; set; }Indicates whether the control can receive the focus and respond to user-generated events.(Inherited from ActiveXControl.)
IsLocked { get; set; }Indicates whether data in the control is locked for editing.(Inherited from ActiveXControl.)
IsMultiLine { get; set; }Indicates whether the control can display more than one line of text.
IsTransparent { get; set; }Indicates whether the control is transparent.(Inherited from ActiveXControl.)
virtual IsVisible { get; set; }Indicates whether this control is visible.(Inherited from ActiveXControlBase.)
IsWordWrapped { get; set; }Indicates whether the contents of the control automatically wrap at the end of a line.
LinkedCell { get; set; }Gets and sets the linked cell.(Inherited from ActiveXControlBase.)
ListFillRange { get; set; }Gets and sets the list fill range.(Inherited from ActiveXControlBase.)
MaxLength { get; set; }Gets and sets the maximum number of characters
MouseIcon { get; set; }Gets and sets a custom icon to display as the mouse pointer for the control.(Inherited from ActiveXControlBase.)
MousePointer { get; set; }Gets and sets the type of icon displayed as the mouse pointer for the control.(Inherited from ActiveXControlBase.)
PasswordChar { get; set; }Gets and sets a character to be displayed in place of the characters entered.
ScrollBars { get; set; }Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither.
virtual Shadow { get; set; }Indicates whether to show a shadow.(Inherited from ActiveXControlBase.)
ShowDropButtonTypeWhen { get; set; }Specifies the symbol displayed on the drop button
SpecialEffect { get; set; }Gets and sets the special effect of the control.
TabKeyBehavior { get; set; }Indicates whether tab characters are allowed in the text of the control.
Text { get; set; }Gets and set text of the control.
TextAlign { get; set; }Represents how to align the text used by the control.(Inherited from ActiveXControl.)
override Type { get; }Gets the type of the ActiveX control.
virtual Width { get; set; }Gets and sets the width of the control in unit of points.(Inherited from ActiveXControlBase.)
Workbook { get; }Gets the Workbook object.(Inherited from ActiveXControlBase.)

Examples

[C#]
//Initialize a new workbook.
Workbook book = new Workbook();

//Add a TextBoxActiveXControl.
Shape shape = book.Worksheets[0].Shapes.AddActiveXControl(ControlType.TextBox, 1, 0, 1, 0, 100, 50);
TextBoxActiveXControl activeXControl = (TextBoxActiveXControl)shape.ActiveXControl;

//do your business

//Save the excel file.
book.Save("exmaple.xlsx");

See Also