当前位置:网站首页>Flet tutorial 03 basic introduction to filledbutton (tutorial includes source code) (tutorial includes source code)

Flet tutorial 03 basic introduction to filledbutton (tutorial includes source code) (tutorial includes source code)

2022-07-04 13:44:00 Knowledge fatness

FilledButton What is it?

FilledButton stay FloatingActionButton After that, it has the greatest visual impact , It should be used to complete the important final operation of the process , for example Save、Join now or Confirm.

Basic code

 Please add a picture description

import flet
from flet import FilledButton, Page


def main(page: Page):
    page.title = "Basic filled buttons"
    page.add(
        FilledButton(text="Filled button"),
        FilledButton("Disabled button", disabled=True),
        FilledButton("Button with icon", icon="add"),
    )

flet.app(target=main)

Parameters

  • text
    The text displayed on the button

  • icon
    Icon displayed in button .

  • icon_color
    Icon color .

  • tooltip
    The text displayed when hovering the mouse over the button .

  • autofocus
    If the control will be selected as the initial focus , It is true . If there are multiple controls with auto focus set on the page , The first control added to the page will get focus .

  • content
    Controls that represent custom button content .

原网站

版权声明
本文为[Knowledge fatness]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207040944216993.html