Skip to content

Scrolling over grid #908

Answered by BctfN0HUK7Yg
BctfN0HUK7Yg asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I found this

           let mut scroll_area = egui::containers::ScrollArea::both();
           if ui.input().pointer.middle_down() { self.y_offset-=ui.input().pointer.delta().y}
             scroll_area = scroll_area.scroll_offset(self.y_offset); 
           scroll_area.show(ui, |ui| { ....

but how to scroll horizontally? In the demo there is vertical_scroll method, but i hasn't it

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@emilk
Comment options

Answer selected by BctfN0HUK7Yg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants