How to read out Point2 position of the mouse while click+hold+dragging on an ImgTag?


#1

Hi everyone,

I’m looking at the script example starting with “rcmenu MyRCmenu” on this page:

https://help.autodesk.com/view/MAXDEV/2023/ENU/?guid=GUID-0A492074-4A5B-4D18-B65A-E859FC8E2454

When run it gives all the mouse button click events, which is great.

But on top of that I would like a ‘drag event’: so when you click with the left mouse button, hold it, and then drag across then ImgTag, the event would constantly output the Point2 position of the mouse on the ImgTag.

Is that at all possible? Thanks!!


#2

you could set a timer when click down , use the pos as root , real time pos - root + the event pos = new pos


#3

Use the .NET (Forms) controls or Qt widgets. MXS via Rollout controls does not provide a simple and easy solution to what you are asking.


#4

Okay good to know, thanks guys!