Replies: 3 comments
-
do you mean something like this, a container inside a container?
or do you mean the next object in a column with "under"? e.g.
|
Beta Was this translation helpful? Give feedback.
-
You could grab it from the |
Beta Was this translation helpful? Give feedback.
-
I attach a code example: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, I had a somewhat special request, is it possible to identify a container below in another container? For example imagine a blue container that is under a purple container is it possible with a function to understand if there is something under the purple container? And what more do you show me on the screen?
Thanks everyone
Update:
I attach a code example:
"""
def game(self: ft.Page):
self.bgcolor = ft.colors.WHITE
self.window_bgcolor = ft.colors.WHITE
self.window_center()
def movable(e):
while True:
for i in range(0,900,4):
b.top = i
sleep(0.01)
self.update()
else:
break
b = ft.Container(
width=100,
height=100,
alignment=ft.alignment.center,
bgcolor=ft.colors.BLUE_300,
border_radius=5,
animate = 1000,
)
f = ft.Container(
width=1000,
height=100,
bgcolor=ft.colors.PURPLE,
border_radius=5,
animate = 1000,
top=900,
)
a = ft.Stack(
controls=[
b,f
]
)
self.add(a)
sleep(2)
movable(None)
"""
In this case there is a box going down that then to end up in the purple container, I want it to be detected when the blue container goes down into the purple container and then tell me whether it is present or not with a print() for example.
Beta Was this translation helpful? Give feedback.
All reactions