showcontextmenu

Simple way to show contextmenu on left click in a nice drop-down way.

Download
Download

You are now following this Submission

Cite As

Igor (2026). showcontextmenu (https://se.mathworks.com/matlabcentral/fileexchange/31448-showcontextmenu), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Interactive Control and Callbacks in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.4.0

added test_showcontextmenu4:
in this example, in contrast to test_showcontextmenu, right-click menu is shown below the button (not on click position)

Download
1.3.0

Thanks to Jesse this now supports uipushtool and uitoggletool objects (toolbar items).
usage example provided in test_showcontextmenu3.

Download
1.2.0

+support for lines etc. (objects without 'units' property (menu would be displayed on click position)
+"assert" removed with if..error

Download
1.0.0

Download