Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollMode.ALWAYS probably works incorrect #3234

Open
sagittarius-H opened this issue May 7, 2024 · 1 comment
Open

ScrollMode.ALWAYS probably works incorrect #3234

sagittarius-H opened this issue May 7, 2024 · 1 comment

Comments

@sagittarius-H
Copy link

Description

If I activate scrolling for a column and set ScrollMode.ALWAYS and at the same time add only one or some elements to the column whose height is less than the height of the column itself, then the scrollbar is not displayed.

Code example to reproduce the issue:

import flet

def main(page:flet.Page):
    page.title = "Scroll Column Test"
    column = flet.Container(
        content=flet.Column(
            width=200,
            height=200,
            scroll=flet.ScrollMode.ALWAYS,
            # controls=[flet.Text(value=str(i)) for i in range(100)]
            controls=[flet.Text(value="single string",height=20)]
            ),
        theme=flet.Theme(
            scrollbar_theme=flet.ScrollbarTheme(
                track_color={
                    flet.MaterialState.DEFAULT: "#E3E7E8",
                },
                track_visibility=True,
                thumb_color={
                    flet.MaterialState.DEFAULT: "#616161",
                },
                radius=10,
                main_axis_margin=10
            )
        )
    )
    page.add(column)


if __name__ == "__main__":
    flet.app(target=main)

Describe the results you received:

Vertical scrollbar is not displayed

Describe the results you expected:
Vertical scrollbar should be visible, but inactive

Flet version (pip show flet):

Name: flet
Version: 0.22.0
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page: 
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: C:\Users\HermanC\PycharmProjects\flet-Learn\venv\Lib\site-packages
Requires: cookiecutter, fastapi, flet-runtime, packaging, qrcode, uvicorn, watchdog
Required-by:

Give your requirements.txt file (don't pip freeze, instead give direct packages):

flet==0.22.0

Operating system:

Windows 11 21H2

@sagittarius-H
Copy link
Author

Looks like same issue, but for ScrollMode.HIDDEN - #2388

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant