-
Notifications
You must be signed in to change notification settings - Fork 489
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
Slider support on_pressed and on_released event #596
Comments
Why not use the |
|
I guess Slider.onChangeStart and Slider.onChangeEnd should work then? |
Yeah, that's exactly what i need! Could you please fix it? that'll be a big help.[smile face] |
Sure, will make a PR tomorrow. |
Sample code: import flet as ft
def main(page: ft.Page):
page.add(
ft.Slider(
width=200,
on_change=lambda e: print("ON CHANGE:", e.data),
on_change_start=lambda e: print("ON CHANGE START:", e.data),
on_change_end=lambda e: print("ON CHANGE END:", e.data),
),
)
ft.app(target=main) |
The feature has been published as a pre-release and can be installed with the following command:
Usage example: import flet as ft
def main(page: ft.Page):
page.add(
ft.Slider(
width=200,
on_change=lambda e: print("ON CHANGE:", e.data),
on_change_start=lambda e: print("ON CHANGE START:", e.data),
on_change_end=lambda e: print("ON CHANGE END:", e.data),
),
)
ft.app(target=main) |
I want to use Slider to implement a audio slide control component,but there's no on_pressed and on_release event, it bothers me >_<
The text was updated successfully, but these errors were encountered: