Skip to content

shiena/flet-dropzone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flet Dropzone control

Dropzone control for Flet integrating desktop_drop

Installation

pip install flet-dropzone

Build the library before running the script.

for windows user:

flet build windows -v

for macOS user:

flet build macos -v

for linux user:

flet build linux -v

Example

import flet as ft

import flet_dropzone as ftd


def main(page: ft.Page):
    page.vertical_alignment = ft.MainAxisAlignment.CENTER
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER

    page.add(
        ftd.Dropzone(
            content=ft.Container(
                ft.Text("Drop here!"),
                width=500,
                height=500,
                alignment=ft.alignment.center,
                bgcolor="red",
            ),
            on_dropped=lambda e: print(f"Dropped: {e.files}"),
            on_entered=lambda e: print("Entered"),
            on_exited=lambda e: print("Exited"),
        )
    )


ft.app(main)

References

About

a DropZone control that accepts dropped files

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published