TextBox Class

The TextBox object represents text-based control that allows the user to enter text.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.UIRibbonItem
    Autodesk.Revit.UITextBox

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
 NameDescription
Public propertyEnabledGets or sets a value indicating whether the item is enabled.
(Inherited from RibbonItem)
Public propertyImageThe image of the TextBox.
Public propertyItemTextGets or sets the text displayed on the item.
(Inherited from RibbonItem)
Public propertyItemTypeGets the item type.
(Inherited from RibbonItem)
Public propertyLongDescription Long description of the command tooltip
(Inherited from RibbonItem)
Public propertyNameThe name of the item.
(Inherited from RibbonItem)
Public propertyPromptTextThe prompt text for the text box.
Public propertySelectTextOnFocus A value that indicates if the text is selected when the text box gains focus.
Public propertyShowImageAsButtonGets or sets a value that indicates if the Image set in the text box should be displayed as a clickable button.
Public propertyToolTipThe description that appears as a ToolTip for the item.
(Inherited from RibbonItem)
Public propertyToolTipImageThe image to show as a part of the button extended tooltip
(Inherited from RibbonItem)
Public propertyValueThe object that supplies the text value.
Public propertyVisibleGets or sets a value indicating whether the item is visible.
(Inherited from RibbonItem)
Public propertyWidthGets or sets the width of the TextBox.
Top
Methods
 NameDescription
Public methodEquals Determines whether the specified Object is equal to the current Object.
(Inherited from RibbonItem)
Public methodGetContextualHelpGets the contextual help bound with this control.
(Inherited from RibbonItem)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodSetContextualHelpSets the contextual help bound with this button.
(Inherited from RibbonItem)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Events
 NameDescription
Public eventEnterPressedSubscribe 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