# IScrollProvider

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/automation/provider/trait-iscrollprovider/

**trait** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
trait IScrollProvider
```

Exposes methods and properties to support access by a UI Automation client to a control
that acts as a scrollable container for a collection of child objects.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L18)

## Members

- [`peer`](#function-peer)
- [`horizontally_scrollable`](#function-horizontally_scrollable)
- [`horizontal_scroll_percent`](#function-horizontal_scroll_percent)
- [`horizontal_view_size`](#function-horizontal_view_size)
- [`vertically_scrollable`](#function-vertically_scrollable)
- [`vertical_scroll_percent`](#function-vertical_scroll_percent)
- [`vertical_view_size`](#function-vertical_view_size)
- [`scroll`](#function-scroll)
- [`set_scroll_percent`](#function-set_scroll_percent)

<a id="function-peer"></a>

### peer

```rust
fn peer(self: &Self) -> Ref<AutomationPeer>
```

The automation peer that provides this contract.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L20)

<a id="function-horizontally_scrollable"></a>

### horizontally_scrollable

```rust
fn horizontally_scrollable(self: &Self) -> bool
```

Gets a value that indicates whether the control can scroll horizontally.

Windows: `IScrollProvider.HorizontallyScrollable`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L25)

<a id="function-horizontal_scroll_percent"></a>

### horizontal_scroll_percent

```rust
fn horizontal_scroll_percent(self: &Self) -> f64
```

Gets the current horizontal scroll position.

Windows: `IScrollProvider.HorizontalScrollPercent`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L30)

<a id="function-horizontal_view_size"></a>

### horizontal_view_size

```rust
fn horizontal_view_size(self: &Self) -> f64
```

Gets the current horizontal view size.

Windows: `IScrollProvider.HorizontalViewSize`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L35)

<a id="function-vertically_scrollable"></a>

### vertically_scrollable

```rust
fn vertically_scrollable(self: &Self) -> bool
```

Gets a value that indicates whether the control can scroll vertically.

Windows: `IScrollProvider.VerticallyScrollable`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L40)

<a id="function-vertical_scroll_percent"></a>

### vertical_scroll_percent

```rust
fn vertical_scroll_percent(self: &Self) -> f64
```

Gets the current vertical scroll position.

Windows: `IScrollProvider.VerticalScrollPercent`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L45)

<a id="function-vertical_view_size"></a>

### vertical_view_size

```rust
fn vertical_view_size(self: &Self) -> f64
```

Gets the vertical view size.

Windows: `IScrollProvider.VerticalViewSize`. macOS: no mapping.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L50)

<a id="function-scroll"></a>

### scroll

```rust
fn scroll(self: &Self, horizontal_amount: ScrollAmount, vertical_amount: ScrollAmount) -> Result<(), AutomationError>
```

Scrolls the visible region of the content area horizontally and vertically.

Windows: `IScrollProvider.Scroll`.
macOS: `NSAccessibilityProtocol.accessibilityPerformScroll*ByPage` (large increments
and decrements only).
## Errors

An `AutomationError` when the state of the element refuses the call
(the exception the member throws in the original).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L62)

<a id="function-set_scroll_percent"></a>

### set_scroll_percent

```rust
fn set_scroll_percent(self: &Self, horizontal_percent: f64, vertical_percent: f64) -> Result<(), AutomationError>
```

Sets the horizontal and vertical scroll position as a percentage of the total content
area within the control.

Windows: `IScrollProvider.SetScrollPercent`. macOS: no mapping.
## Errors

An `AutomationError` when the state of the element refuses the call
(the exception the member throws in the original).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_scroll_provider.rs#L73)

## Trait implementations

- [`IScrollProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iscrollprovider/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
