Skip to main content

WithScrollbar

Trait WithScrollbar 

Source
pub trait WithScrollbar {
    // Required method
    fn with_scrollbar(self, handle: &ScrollHandle, axes: ScrollAxes) -> Self;
}
Expand description

Minimal WithScrollbar replacement: applies native overflow_scroll + track_scroll for the requested axes. Does not render a visible scrollbar thumb/track (see ScrollAxes docs). Takes a Stateful<Div> (i.e. after .id(...)) because gpui only implements StatefulInteractiveElement (which provides overflow_*_scroll/ track_scroll) for stateful elements, not bare Div.

Required Methods§

Source

fn with_scrollbar(self, handle: &ScrollHandle, axes: ScrollAxes) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl WithScrollbar for Stateful<Div>

Source§

fn with_scrollbar(self, handle: &ScrollHandle, axes: ScrollAxes) -> Self

Implementors§