Pill
The Pill class includes methods for creating and managing a VisualElement that resembles a capsule. The Pill class includes text, an icon, and two optional child VisualElements: one to the left of the pill, and one to the right of the pill.
Read time 7 minutesLast updated 6 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Experimental.GraphView
- Assembly: UnityEditor
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
public class Pill : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
Constructors
Constructor | Description |
|---|---|
| Pill() | Constructs a pill with its optional left and right child VisualElements. |
| Pill(UnityEngine.UIElements.VisualElement,UnityEngine.UIElements.VisualElement) | Constructs a pill with its optional left and right child VisualElements. |
Properties
Property | Description |
|---|---|
| highlighted | Returns whether the pill is highlighted. |
| icon | The icon of the pill. |
| left | The VisualElement to the left of the pill. |
| right | The VisualElement to the right of the pill. |
| text | The text of the pill. |