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

Disabled the dropwown, but the color isnot gray #2989

Closed
yinshunyao opened this issue Apr 5, 2024 · 0 comments · Fixed by #3183
Closed

Disabled the dropwown, but the color isnot gray #2989

yinshunyao opened this issue Apr 5, 2024 · 0 comments · Fixed by #3183
Assignees

Comments

@yinshunyao
Copy link

Set the dropdown to be disabled, but the color is normal

Code example to reproduce the issue:

import flet as ft

def main(page: ft.Page):
    drop = ft.Dropdown(
        label="disabled but color is wrong",
        options=[ft.dropdown.Option(str(i)) for i in range(3)])
    text = ft.TextField(value="disabled", disabled=True)
    drop1 = ft.Dropdown(
        label="disabled set color gray",
        options=[ft.dropdown.Option(str(i)) for i in range(3)],
        disabled=True, border_color=ft.colors.GREY_300, label_style=ft.TextStyle(color=ft.colors.GREY_400))

    drop.disabled = True
    page.add(drop)
    page.add(text)
    page.add(drop1)

if __name__ == '__main__':
    ft.app(target=main, name="index", host='0.0.0.0', port=37876, view=ft.WEB_BROWSER)

**Describe the results you received:
the color of the first control named drop isnot gray
**
image

Describe the results you expected:all controls are gray, including the control named drop

Additional information you deem important (e.g. issue happens only occasionally):

Flet version (pip show flet):

flet                      0.21.2
flet-core                 0.21.2
flet-runtime              0.21.2

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

(The requirements)

Operating system: MacOS

Additional environment details:

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

Successfully merging a pull request may close this issue.

2 participants