-
Notifications
You must be signed in to change notification settings - Fork 589
Closed
Description
from inspect import stack
import flet
from flet import Stack, Container, Draggable, DragTarget, Page, Row, border, colors
def main(page: Page):
page.title = "Drag and Drop example"
_stack_ = Stack([])
_container_ = Container(_stack_)
c = Draggable(content=_container_)
_container_.width = 800
_container_.height = 480
_container_.bgcolor = "#111234"
_stack_2 = Stack([])
_container_2 = Container(_stack_2)
c2 = Draggable(content=_container_2)
_container_2.bgcolor = "red"
_container_2.height = 150
_container_2.left = 300
_container_2.top = 300
_container_2.width = 200
_stack_.controls.append(_container_2)
page.add(
c
)
flet.app(target=main)
i want to make _container_2 draggable
from inspect import stack
import flet
from flet import Stack, Container, Draggable, DragTarget, Page, Row, border, colors
def main(page: Page):
page.title = "Drag and Drop example"
_stack_ = Stack([])
_container_ = Container(_stack_)
c = Draggable(content=_container_)
_container_.width = 800
_container_.height = 480
_container_.bgcolor = "#111234"
_stack_2 = Stack([])
_container_2 = Container(_stack_2)
c2 = Draggable(content=_container_2)
_container_2.bgcolor = "red"
_container_2.height = 150
_container_2.left = 300
_container_2.top = 300
_container_2.width = 200
_stack_.controls.append(c2)
page.add(
c
)
flet.app(target=main)
from inspect import stack
import flet
from flet import Stack, Container, Draggable, DragTarget, Page, Row, border, colors
def main(page: Page):
page.title = "Drag and Drop example"
_stack_ = Stack([])
_container_ = Container(_stack_)
c = Draggable(content=_container_)
_container_.width = 800
_container_.height = 480
_container_.bgcolor = "#111234"
_stack_2 = Stack([])
_container_2 = Container(_stack_2)
c2 = DragTarget(content=_container_2)
_container_2.bgcolor = "red"
_container_2.height = 150
_container_2.left = 300
_container_2.top = 300
_container_2.width = 200
_stack_.controls.append(c2)
page.add(
c
)
flet.app(target=main)
make _container_2 DragTarget is same as Draggable
add Draggable or DragTarget to stack not work well
Metadata
Metadata
Assignees
Labels
No labels

