SearchFieldBase<TextInputType, T>
The base class for a search field.
Read time 6 minutesLast updated 10 days ago
Definition
- Type: Class
- Namespace: UnityEditor.UIElements
- Assembly: UnityEditor
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, INotifyValueChanged<T>
public abstract class SearchFieldBase<TextInputType, T> : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, INotifyValueChanged<T> where TextInputType : TextInputBaseField<T>, new()
Static Fields
Value | Description |
|---|---|
| cancelButtonOffVariantUssClassName | USS class name of cancel buttons in elements of this type, when they are off. |
| cancelButtonUssClassName | USS class name of cancel buttons in elements of this type. |
| popupVariantUssClassName | USS class name of elements of this type, when they are using a popup menu. |
| searchButtonUssClassName | USS class name of search buttons in elements of this type. |
| textInputUssClassName | USS class name of text input elements in elements of this type. |
| textUssClassName | USS class name of text elements in elements of this type. |
| ussClassName | USS class name of elements of this type. |
Properties
Property | Description |
|---|---|
| placeholderText | A short hint to help users understand what to enter in the field. |
| searchButton | The search button. |
| textInputField | The text field used by the search field to draw and modify the search string. |
| value | The object currently being exposed by the field. |
Methods
Method | Description |
|---|---|
| ClearTextField | Method used when clearing the text field. You should usually clear the value when overriding the method. |
| FieldIsEmpty | Tells if the field is empty. That meaning depends on the type of T. |
| SetValueWithoutNotify | Sets the value for the toolbar search field without sending a change event. |