Class ScrollTextAreaScrolledEvent
Event published by a ScrollTextArea whenever its scroll position changes, whether by user drag, mouse wheel, programmatic scroll, or momentum continuation. Subscribe to this event to react to any scroll movement on a specific area.
Inherited Members
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
public sealed class ScrollTextAreaScrolledEvent : ScyllaEvent
Constructors
ScrollTextAreaScrolledEvent(ScrollTextArea, float, float)
Initializes a new ScrollTextAreaScrolledEvent with the scroll area that was scrolled and its position before and after the operation.
Declaration
public ScrollTextAreaScrolledEvent(ScrollTextArea scrollTextArea, float previousPosition, float newPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollTextArea | scrollTextArea | The ScrollTextArea that was scrolled. |
| float | previousPosition | The scroll position (in pixels) before the operation. |
| float | newPosition | The scroll position (in pixels) after the operation. |
Properties
Delta
Gets the signed change in scroll position in pixels (NewPosition - PreviousPosition). A positive value indicates scrolling down (toward newer/later content); a negative value indicates scrolling up.
Declaration
public float Delta { get; }
Property Value
| Type | Description |
|---|---|
| float |
IsAtBottom
Gets whether the scroll area is now at the bottom of its content (no further
down-scroll is possible). Returns false when ScrollTextArea
is null.
Declaration
public bool IsAtBottom { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsAtTop
Gets whether the scroll area is now at the top of its content (no further up-scroll
is possible). Returns false when ScrollTextArea is null.
Declaration
public bool IsAtTop { get; }
Property Value
| Type | Description |
|---|---|
| bool |
NewPosition
Gets the pixel scroll position immediately after this scroll operation. Measured from the top of the content area (0 = fully scrolled to top).
Declaration
public float NewPosition { get; }
Property Value
| Type | Description |
|---|---|
| float |
PreviousPosition
Gets the pixel scroll position immediately before this scroll operation. Measured from the top of the content area (0 = fully scrolled to top).
Declaration
public float PreviousPosition { get; }
Property Value
| Type | Description |
|---|---|
| float |
ScrollTextArea
Gets the ScrollTextArea that was scrolled.
Declaration
public ScrollTextArea ScrollTextArea { get; }
Property Value
| Type | Description |
|---|---|
| ScrollTextArea |