-
Notifications
You must be signed in to change notification settings - Fork 654
Expand file tree
/
Copy pathno_frame_window.py
More file actions
32 lines (26 loc) · 873 Bytes
/
no_frame_window.py
File metadata and controls
32 lines (26 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import flet as ft
def main(page: ft.Page):
page.window.title_bar_hidden = True
page.window.title_bar_buttons_hidden = True
async def handle_window_close(e: ft.Event[ft.IconButton]):
await page.window.close()
page.add(
ft.Row(
controls=[
ft.WindowDragArea(
expand=True,
content=ft.Container(
bgcolor=ft.Colors.AMBER_300,
padding=10,
content=ft.Text(
"Drag this area to move, maximize and "
"restore application window."
),
),
),
ft.IconButton(ft.Icons.CLOSE, on_click=handle_window_close),
]
)
)
if __name__ == "__main__":
ft.run(main)