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

Closing App #229

Closed
Charles808 opened this issue Aug 25, 2022 · 6 comments
Closed

Closing App #229

Charles808 opened this issue Aug 25, 2022 · 6 comments

Comments

@Charles808
Copy link

How to close the app programmatically ?

I used page.window_full_screen = True, which make the close button cannot be seen
So, I need to make my own button to close flet.

I tried, several things like:

  1. exit()
  2. quit()
  3. sys.exit()
  4. page.close()
  5. etc

But nothing works..
I need the full window to be True, cause in my case window_maximized is not working,
even after I called page.update()

@fauzaanu
Copy link

Did you try this? https://flet.dev/docs/controls/page/#window_destroy

@FeodorFitsner
Copy link
Contributor

What operating system are you running it on?

@Charles808
Copy link
Author

@fauzaanu I think I miss that info from the doc, I tried it and it works ! Thank you !

@FeodorFitsner It is on windows. Anyway, Thanks to @fauzaanu it is working as expected. But just for info, window_maximized is not working after set to true, I have seen other solved issue regarding to this problem. It set both left and top window to zero, then set maximized to true, and called page.update(). Weirdly, it is not working on my case, the window still minimized.

@FeodorFitsner
Copy link
Contributor

Thank you for the update! I'm working on a fix for window_maximized which will be published tomorrow.

@FeodorFitsner
Copy link
Contributor

There is a new method on the block! page.window_close() which closes window and causes close intercepting logic to work.

@FeodorFitsner
Copy link
Contributor

Just released Flet 0.1.53 with window_maximized fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants