UIContextMenu on object in bottom layer of UIStack

I am using two Y Axes to display my results, which are of different nature but need to be shown at the same time and on the same plot. All the line objects have a UIContextMenu associated. The right Y axes are transparent and placed on top by using uistack. My problem is that in this way I am not able to use the context menu on the lines on the left Y axes, any suggestion?

 Accepted Answer

You can disable the sensitivity of an object (here the axes) for right-clicks by setting its 'HitTest' property to 'off'. Then a mouse-click if forwarded to the underlying elements.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Asked:

on 22 Mar 2017

Answered:

Jan
on 22 Mar 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!