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 if we have the have page.window.right
import flet as ft
async def main(page: ft.Page):
max_width = 1280 #Assumed
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)
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 if we have the have page.window.right
Screenshots
No response
Additional details
No response
The text was updated successfully, but these errors were encountered: