Skip to content

Sliders can have out of bound value, if set manually #1052

@xylix

Description

@xylix

Following code prints 150. It should perhaps error, or force the value between the min and max in some way? (Or if this is as intended perhaps document the behaviour.)

import flet as ft
def main(page):
    slider = ft.Slider(min=0, max=100, divisions=100, value=150, label="{value}%")
    page.add(
        ft.Text("Slider with a custom range and label:"),
        slider
        )
    print(slider.value)
ft.app(target=main)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontrols

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions