Skip to content

[Question]How do I implement drag and drop windows for a custom appbar? #1853

Closed Answered by XiEdAotonG
XiEdAotonG asked this question in Q&A
Discussion options

You must be logged in to vote

Set the property title of AppBar to ft WindowDragArea (content=ft. Text ("xxx", size=18), width=500), with sufficient width to achieve

ft.AppBar(
            title=ft.WindowDragArea(content=ft.Text("XXX"), width=500),
            actions=[
                ft.IconButton(ft.icons.CLOSE, on_click=lambda _: self.page.window_close(), tooltip="关闭",
                              icon_size=18),
            ],
        )

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by XiEdAotonG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
1 participant