flet icon indicating copy to clipboard operation
flet copied to clipboard

ScrollMode.HIDDEN does not hide scroll bar

Open saadjoe opened this issue 2 years ago • 3 comments

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.

image

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:

saadjoe avatar Jan 12 '24 21:01 saadjoe

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

ranonbezerra avatar May 02 '24 17:05 ranonbezerra

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)

Victorgonl avatar Sep 28 '24 04:09 Victorgonl

Flet 0.27.6, still the same issue.

The workaround that @Victorgonl proposed works well

WhiteHeadbanger avatar Apr 28 '25 11:04 WhiteHeadbanger