0
import flet as ft


async def main(page: ft.Page):
    page.bgcolor = '#024135'
    dd = ft.Dropdown(
        width=100,
        bgcolor='#024135',
        color='white',
        options=[
            ft.dropdown.Option(text='Option 1'),
            ft.dropdown.Option(text='Option 2'),
        ],
    )
    await page.add_async(dd)


ft.app(target=main)

How to change the background color of a dropdown option selection menu? I used bgcolor and color but it didn't affect the selection menu. After clicking on the option the colors are as expected, but not while displaying the options. This part displayed in gray color I want to leave in green color.

img1

img2

I expected that the display of the options when clicked had the informed background color.

Pawel Kam
  • 1,684
  • 3
  • 14
  • 30

0 Answers0