ericwhudson Posted January 14, 2009 Report Share Posted January 14, 2009 Hi, I am updating a number of VIs written in 7.1 to 8.2 (I always seem to be a few years behind). Anyway, now that the cursor legend has changed (for much the worse as far as I can tell) I have a problem I hope someone can help with. I have code that looks for arrow keypresses and moves the cursors around based on that. The problem is that the cursor legends are like tree controls now, and they always "drop down" when I update the cursor location programmatically. So if I have a two line legend for two cursors, the second cursor information drops out of view. Is there any way to shut off the tree control? Since these are single plot cursors, I'm not sure what the purpose of having the drop down is anyway. Short of that, is there a way to force them to close back up? In case I'm doing something wrong, I should note that the programmatic changes (writing to WFGraph property cursor.index) make this happen, while dragging the cursors with the mouse or using the cursor mover don't. And while I'm at it, a slightly related question: I capture right mouse clicks on the graph in order to pop-up a custom menu (with information calculated from the cursor position). Of course, this prevents right clicks going to the cursor legend. Is there an easy way to know when the right click is in the cursor legend so I can not discard it? Thanks in advance for your help, Eric Quote Link to comment
djolivet Posted January 15, 2009 Report Share Posted January 15, 2009 Hi Eric, In regards to your question about right click monitoring. I would use the new context menu features (I think this was available for LV8.2). This way you would not have to intercept the right click, restoring normal behaviour on the cursor tree control. See attached. Hope this helps Denis Quote Link to comment
TobyD Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (djolivet @ Jan 14 2009, 04:42 AM) I would use the new context menu features (I think this was available for LV8.2)... That's very cool. I didn't know about that feature :thumbup: Quote Link to comment
ericwhudson Posted January 15, 2009 Author Report Share Posted January 15, 2009 Wow, that is very nice. Wish it were around when I first made my own context menus. It looks like you can even update them programmatically, which is what I need. Thanks very much. That unfortunately doesn't solve the bigger problem of the cursor legend trees "dropping down" on their own. Anyone know of a way to programmatically close them back up? Eric QUOTE (djolivet @ Jan 14 2009, 07:42 AM) Hi Eric,In regards to your question about right click monitoring. I would use the new context menu features (I think this was available for LV8.2). This way you would not have to intercept the right click, restoring normal behaviour on the cursor tree control. See attached. Hope this helps Denis Quote Link to comment
ericwhudson Posted January 15, 2009 Author Report Share Posted January 15, 2009 Wow, that is very nice. Wish it were around when I first made my own context menus. It looks like you can even update them programmatically, which is what I need. Thanks very much. That unfortunately doesn't solve the bigger problem of the cursor legend trees "dropping down" on their own. Anyone know of a way to programmatically close them back up? Eric QUOTE (djolivet @ Jan 14 2009, 07:42 AM) Hi Eric,In regards to your question about right click monitoring. I would use the new context menu features (I think this was available for LV8.2). This way you would not have to intercept the right click, restoring normal behaviour on the cursor tree control. See attached. Hope this helps Denis 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.