Guenther Posted July 18, 2008 Report Share Posted July 18, 2008 Hi, I've got an array of clusters for which I configured a run time menu. Problem is, during program execution the run time menu is only shown if the right mouse click is done on the frame of the array or exactly between the elements, not if the mouse hovers over the array elements. I tried to configure a run-time menu for the array element or an element of the cluster but LV doesn't offer this option. How can I get the menu to appear regardless where on the array area the mouse click is done? Thanks in advance, Guenther EDIT: forgot to mention, this is LV 8.5.1 Quote Link to comment
Yair Posted July 18, 2008 Report Share Posted July 18, 2008 I don't have LV in front of me at the moment, so I can't look at your code, but you could try using the Mouse Down? event for the array and if allowed use the filters to modify the click to happen in a point which is on the array border. I don't think you can register the event for the array element directly, but you should be able to do this with dynamic registeration. You might be able to use the filter event to move the event to the array control. Quote Link to comment
LAVA 1.0 Content Posted July 18, 2008 Report Share Posted July 18, 2008 QUOTE (Yair @ Jul 17 2008, 07:10 PM) I don't have LV in front of me at the moment, so I can't look at your code, but you could try using the Mouse Down? event for the array and if allowed use the filters to modify the click to happen in a point which is on the array border.I don't think you can register the event for the array element directly, but you should be able to do this with dynamic registeration. You might be able to use the filter event to move the event to the array control. Whoah, that was hard to find. But you disabled the string control... Enabling the string control makes the right-click working (it already worked on the picture control). To disable selecting of the text (which is most likely why disabled it) you should filter for mouse-down? events on the array. To disable the changing of the mouse you should look for mouse enter and leave events and alter the mouse as desired. Ton Quote Link to comment
Guenther Posted July 19, 2008 Author Report Share Posted July 19, 2008 QUOTE (Ton @ Jul 17 2008, 08:21 PM) Whoah, that was hard to find. But you disabled the string control... Yep, that was it. I wanted to prevent the cursor to be in the indicator field. Enabling the string indicator again makes the menu work. I do have a "mouse down" event that I use to select one of the items. To prevent the cursor from showing in the indicator I now redirected the key focus to a dummy control in this event. Is this the way to go or is there something more elegant? Thanks a lot! :worship: Cheers, Guenther 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.