Jump to content

Array run time shortcut menu


Recommended Posts

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

Link to comment

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.

Link to comment

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.