Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Pop up menu in axes

Subject: Pop up menu in axes

From: Vicki

Date: 7 Oct, 2010 15:26:04

Message: 1 of 2

Hello!

I'm attempting to make a system in which I can click on a figure in a set of axes, at which point a different drop down menu will come up based on whether I right or left clicked. So...I want to put my mouse over the figure, and left click. At this point, I want a menu to descend from the mouse, as you would get in any "normal" program.

Is this possible to do in MATLAB?

Thanks for any tips in the right direction...

Subject: Pop up menu in axes

From: Sean

Date: 7 Oct, 2010 15:44:04

Message: 2 of 2

"Vicki " <vtrials@mit.edu> wrote in message <i8koqc$bni$1@fred.mathworks.com>...
> Hello!
>
> I'm attempting to make a system in which I can click on a figure in a set of axes, at which point a different drop down menu will come up based on whether I right or left clicked. So...I want to put my mouse over the figure, and left click. At this point, I want a menu to descend from the mouse, as you would get in any "normal" program.
>
> Is this possible to do in MATLAB?
>
> Thanks for any tips in the right direction...

Here are a few ideas:
Look at the third output to ginput() for one way to see if the right button was clicked. (Though there may be a better way to do it)
Then look into uicontrol() for the 'listbox' or 'popupmenu' option.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us