Is there a way to access the awt component of any ...
# compose-desktop
h
Is there a way to access the awt component of any composable (im not sure if this question even makes sense tbh)? im implementing drag and dropping files onto my app, and right now im setting window.dropTarget, which triggers an even when dragging things onto anywhere in the window, but i only want to it work when dragging onto a specific panel. is it possible to get the specific component and set its droptarget?
a
The entire compose app is drawn on the window itself.
There’s not an awt component underlying every compose element.
h
right, then is there a way to achieve what i want?
a
Have you seen
Modifier.onExternalDrag
?
h
i couldve sworn i tried that and it wasnt being recognised as a valid method of modifier but thats definitely the way to go, thanks
i had the same issue to solve. sadly no really out of the box solutions available
h
no the modifier.onExternalDrag works
@Zoff
image.png,image.png
you only get the file paths but with that you can do whatever you want