page.window_maximized Error : 'bool' object is not callable #797
Unanswered
bobwatcherx
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I don't really get your question. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This doesn't show any error. Hope it works as expected. from flet import *
from flet import icons
def main(page: Page):
page.window_max_height = 520
page.window_max_width = 400
page.window_frameless = True
page.spacing = 0
page.padding = 0
# DETECT WIDTH
widthsrc = page.window_width
def maximize_win(e):
# docs: https://flet.dev/docs/controls/page#window_maximized
page.window_maximized = True
page.update()
page.add(
ResponsiveRow([
WindowDragArea(
Container(
width=widthsrc,
bgcolor="blue",
padding=15,
content=Row([
Text("MyHome", size=30, color="white"),
Container(content=Row([
IconButton(icons.CHECK_BOX_OUTLINE_BLANK, icon_color="white",
on_click=maximize_win),
IconButton(icons.CLOSE, icon_color="white",
on_click=lambda e: page.window_close()),
]))
], alignment="spaceBetween")
),
)
])
)
flet.app(target=main) The error comes from here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use maximized and it works but it has to be clicked 2 times, and when it is clicked, it gets an error like this how to solve it?
error message:
raceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/minto/belajar/fletApp/fletfons/main.py", line 22, in
on_click=lambda _:page.window_maximized()),
TypeError: 'bool' object is not callable
Beta Was this translation helpful? Give feedback.
All reactions