ScrollMode.HIDDEN does not hide scroll bar
Description
When utilizing ScrollMode.HIDDEN, the scroll bar persists in appearing while scrolling through the page.
Code example to reproduce the issue:
import flet as ft
def main(page: ft.Page):
page.scroll = ft.ScrollMode.HIDDEN
page.add(ft.Column(controls=[ft.Text(value="Hello, world!") for _ in range(100)]))
ft.app(target=main)
Describe the results you received:
Despite setting ScrollMode.HIDDEN, the scroll bar is still visible when scrolling through the page.
Describe the results you expected:
The scroll bar should not be visible during scrolling, as ScrollMode.HIDDEN suggests.
Additional information you deem important:
Flet version (pip show flet):
0.18.0
Operating system:
Windows 11 23H2
Additional environment details:
I'm having the same issue, trying in a Row instead of a Column. Already tried putting the ScrollMode inside the Row, the View and the Page in all possible combinations and neither work.
Flet version 0.22.0 Operating system macOS Sonoma (14.4.1) M2
Same issue here (Flet 0.24.1). Here's a possible solution using ScrollbarTheme:
import flet as ft
def main(page: ft.Page):
# A possible solution using `ScrollbarTheme`
page.theme = ft.Theme(scrollbar_theme=ft.ScrollbarTheme(thickness=0.0))
page.scroll = ft.ScrollMode.HIDDEN
page.add(
ft.Column(controls=[ft.Text(value=f"Hello, world! -- {i}") for i in range(100)])
)
ft.app(target=main)
Flet 0.27.6, still the same issue.
The workaround that @Victorgonl proposed works well