Skip to content
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

Update no-frame-window.py #174

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions python/controls/window-drag-area/no-frame-window.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import flet
import flet as ft
from flet import Container, IconButton, Page, Row, Text, WindowDragArea, colors, icons
Copy link
Contributor

@ndonkoHenri ndonkoHenri Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using import flet as ft, you need to remove the from flet import x, y, z, then update the remaining code to use ft.
Code looks like this later on.



def main(page: Page):
page.window_title_bar_hidden = True
page.window_title_bar_buttons_hidden = True
page.window.title_bar_hidden = True
page.window.title_bar_buttons_hidden = True

page.add(
Row(
Expand All @@ -19,10 +18,9 @@ def main(page: Page):
),
expand=True,
),
IconButton(icons.CLOSE, on_click=lambda _: page.window_close()),
IconButton(icons.CLOSE, on_click=lambda e: page.window.close()),
]
)
)


flet.app(target=main)
ft.app(target=main)