TextBox Class


Text Box Class

The TextBox object represents text-based control that allows the user to enter text.
Inheritance Hierarchy

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class TextBox : RibbonItem

The TextBox type exposes the following members.

Properties
Name Description
Public property Enabled Gets or sets a value indicating whether the item is enabled.
(Inherited from RibbonItem )
Public property Image The image of the TextBox.
Public property ItemText Gets or sets the text displayed on the item.
(Inherited from RibbonItem )
Public property ItemType Gets the item type.
(Inherited from RibbonItem )
Public property LongDescription Long description of the command tooltip
(Inherited from RibbonItem )
Public property Name The name of the item.
(Inherited from RibbonItem )
Public property PromptText The prompt text for the text box.
Public property SelectTextOnFocus A value that indicates if the text is selected when the text box gains focus.
Public property ShowImageAsButton Gets or sets a value that indicates if the Image set in the text box should be displayed as a clickable button.
Public property ToolTip The description that appears as a ToolTip for the item.
(Inherited from RibbonItem )
Public property ToolTipImage The image to show as a part of the button extended tooltip
(Inherited from RibbonItem )
Public property Value The object that supplies the text value.
Public property Visible Gets or sets a value indicating whether the item is visible.
(Inherited from RibbonItem )
Public property Width Gets or sets the width of the TextBox.
Top
Methods
Name Description
Public method Equals Determines whether the specified Object is equal to the current Object .
(Inherited from RibbonItem )
Public method GetContextualHelp Gets the contextual help bound with this control.
(Inherited from RibbonItem )
Public method GetHashCode Serves as the default hash function.
(Inherited from Object )
Public method GetType Gets the Type of the current instance.
(Inherited from Object )
Public method SetContextualHelp Sets the contextual help bound with this button.
(Inherited from RibbonItem )
Public method ToString Returns a string that represents the current object.
(Inherited from Object )
Top
Events
Name Description
Public event EnterPressed Subscribe to this event to be notified when the Enter button is pressed in the text box.
Top
Remarks
The ItemText property inherited from RibbonItem has no effect. The text entered in the TextBox is edited by the UI user is accepted only if the user presses the Enter key or click the image button when ShowImageAsButton is true. If the user clicks off of this component without pressing Enter or click the image button; then the text will be reverted to the previous value. Use of this class is not supported in Revit Macros.
See Also