didierj Posted February 21, 2005 Report Share Posted February 21, 2005 Has anyone a solution to get the mouse position when over a vi that works: 1. on LV6.1 2. on all platforms (no win-API) Didier Quote Link to comment
aledain Posted February 22, 2005 Report Share Posted February 22, 2005 Not a great solution, but more of a workaround, if you size a picture control to cover your panel, the Mouse poperty will return position. Quote Link to comment
didierj Posted February 22, 2005 Author Report Share Posted February 22, 2005 Not a great solution, but more of a workaround, if you size a picture control to cover your panel, the Mouse poperty will return position. 3979[/snapback] But how do you then react on a button-press without having to decode the position for each control (on your panel that is then behind the picture control) and manually react on the mouse press (then again you are without the event-structure)? Quote Link to comment
aledain Posted February 23, 2005 Report Share Posted February 23, 2005 But how do you then react on a button-press without having to decode the position for each control (on your panel that is then behind the picture control) and manually react on the mouse press (then again you are without the event-structure)? 3983[/snapback] Don't know other than to have a picture control "customised" into each control (ie multiple controls). I think when I used it before it didn't matter if the picture control was behind another control (but I might be wrong). Alternatively place as many picture controls under as many controls as you need to react to. I have used this technique with a cluster before, but it was a long time ago. What exactly are you after? A flyover or drag and drop. The picture control works for flyovers. For the drag and drop there was an article in LTR about 2000, 2001 ? On creating a drag and drop interface. Pretty sure that predated UI events. For a clickable interface you could cutomise the picture control to have an image the same size as the pic control and "hide" the other bits of the control itself. The property node would then return True if the mouse is pressed (left or right). You could pass this into a data change VI (ie returns T only on F->T) and poll for "clicks". cheers, Alex. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.