TextBox
The TextBox object represents text-based control that allows the user to enter text.
Inheritance Hierarchy
System.Object
Autodesk.Revit.UI.RibbonItem
Autodesk.Revit.UI.TextBox
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.
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)
Events
Name
Description
Public Event
EnterPressed
Subscribe to this event to be notified when the Enter button is pressed in the text box.
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.