Skip to content

Add in new convenience function for a hidden Scrollbar#2775

Closed
ellieplayswow wants to merge 1 commit intoiced-rs:masterfrom
ellieplayswow-forks:feature/hidden-scrollbar
Closed

Add in new convenience function for a hidden Scrollbar#2775
ellieplayswow wants to merge 1 commit intoiced-rs:masterfrom
ellieplayswow-forks:feature/hidden-scrollbar

Conversation

@ellieplayswow
Copy link
Contributor

why

  • a Scrollable widget requires a Direction, which in turn requires a Scrollbar
  • all of these are reasonably defaulted to a vertical-only scrollable with a sane 8px wide scrollbar
  • sometimes you want to maintain the scrollable functionality but not display a scrollbar

changes tl;dr

  • adding in convenience function iced_widget::scrollable::Scrollbar::hidden() that is simply default() with zero-width

example:

widget::scrollable(row![
    horizontal_space().width(Length::Fixed(600.0)),
    "hello",
    horizontal_space().width(Length::Fixed(600.0))
])
.direction(Direction::Horizontal(Scrollbar::hidden()))
// you can then control via methods eg iced::widget::scrollable::scroll_to(id, offset)

@hecrj hecrj added this to the 0.14 milestone Nov 20, 2025
@hecrj hecrj added feature New feature or request widget addition labels Nov 20, 2025
@hecrj hecrj closed this in c12d59d Nov 20, 2025
@hecrj
Copy link
Member

hecrj commented Nov 20, 2025

Merged manually, since I wasn't able to push to your branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition feature New feature or request widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments