You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the opened issues and there are no duplicates
Describe the requested feature
I want to keep my window on the left or to the right based on a condition. and it's hard to get the maximum width of the display. so what if we have page.window.right it will be way easier.
import flet as ft
async def main(page: ft.Page):
max_width = 1280
async def check_window_position():
nonlocal max_width
while True:
if page.window.top > 0 and page.window.bgcolor == ft.colors.TRANSPARENT:
if page.window.left < max_width/2:
page.window.left = 0
page.update()
else:
page.window.left = max_width-10
page.update()
await asyncio.sleep(0.1) # Check every 100ms
asyncio.create_task(check_window_position())
page.add(ft.Text(""))
ft.app(main)
Suggest a solution
get a page.window.right
Screenshots
No response
Additional details
No response
The text was updated successfully, but these errors were encountered:
Duplicate Check
Describe the requested feature
I want to keep my window on the left or to the right based on a condition. and it's hard to get the maximum width of the display. so what if we have page.window.right it will be way easier.
import flet as ft
async def main(page: ft.Page):
max_width = 1280
async def check_window_position():
nonlocal max_width
while True:
if page.window.top > 0 and page.window.bgcolor == ft.colors.TRANSPARENT:
if page.window.left < max_width/2:
page.window.left = 0
page.update()
else:
page.window.left = max_width-10
page.update()
await asyncio.sleep(0.1) # Check every 100ms
asyncio.create_task(check_window_position())
page.add(ft.Text(""))
ft.app(main)
Suggest a solution
get a page.window.right
Screenshots
No response
Additional details
No response
The text was updated successfully, but these errors were encountered: