Skip to main content

overflow_scroll_content

Function overflow_scroll_content 

Source
pub fn overflow_scroll_content<H: UiHost, T>(
    cx: &mut ElementContext<'_, H>,
    layout: LayoutRefinement,
    show_scrollbar: bool,
    content: impl FnOnce(&mut ElementContext<'_, H>) -> T,
) -> AnyElement
where T: IntoUiElement<H>,
Expand description

Like overflow_scroll, but enforces a single content root.

Note: Scroll does not lay out multiple children; if you pass a Vec of siblings they will overlap. Prefer this helper (or *_vstack) to make the intended structure explicit.