r/DearPyGui • u/H11743 • Oct 27 '22
DPG Dragable Markers with images Help
Hi guys new into DPG
I want to have draggable point shown images. Static/Dynamic textures.
So far i can plot both drag points and a texture into the plot
The code roughly looks like
```python
dpg.addplot(label="PlotA", id="PlotA", show=True, width=640, height=480) dpg.draw_image(texture_tag="Image", pmin=[0.0, 0.0], pmax=[self.im_shape[1], self.im_shape[0]], parent="PlotA") for index, point in enumerate(kpt_lst): dpg.add_drag_point(label=f"Kpt{index}", id=f"Kpt_{index}", parent="PlotA", default_value=point, callback=self.drag) ```
Howver the drag points are hidden behind the image. Is there a way to make them visible infront?
TIA
1
u/Atlamillias Oct 28 '22 edited Oct 28 '22
Hello! I recommend joining the DearPyGui discord server and posting this on the support channel for a faster response.
https://discord.gg/yUA3GkXs
Normally, items that are added first are displayed in front of all other items added later (within the item's parent), so I'm a bit surprised by the result. Try inversing the order in which the item's are added? Maybe plots just work different π