How to activate drop down menus by clicking instead of hovering
Show older comments
Hi guys,
i just started creating a complex GUI and i am not that experienced yet. What i would like to have is a menu bar that contains dropdown menus as well as simple buttons... So for example the Tab 'Model' consists of a dropdown menue whereas the Tab 'Help' doesnt offer any other options. So Clicking help should immediately activate a callback whereas clicking 'Model' shall open the dropdown menu for further choices to be made...how can i realize this??? so far i created this Surface below with the GUIDE environment that automatically implements hovering over the tabs insteand of clicking...
I would be very glad for your help:) Best regards, John

6 Comments
Geoff Hayes
on 7 Sep 2015
John - it isn't clear to me what you mean by hovering over the menu items. Do you mean that when you hover over a menu item, the item list automatically expands? I am using R2014a and when I move the mouse over one of the menu items, I have to click it in order to expand the menu item list. If I have just a single Help menu item (with no sub-items) then pressing Help would fire the callback associated with this menu.
When you create the menu items, don't you see callbacks for each being added to your m file? What version of MATLAB are you using?
John
on 7 Sep 2015
Geoff Hayes
on 7 Sep 2015
Hi John - that is an interesting problem that still exists in R2014a. I'm not sure if the behaviour makes sense or not. It definitely doesn't seem consistent as the callbacks for the sub-menus don't fire unless you physically click on them (hovering doesn't seem to cause the callback to fire in this case).
John
on 7 Sep 2015
Image Analyst
on 7 Sep 2015
You forgot to attach your .fig and .m files with the paper clip icon. As of now, no one can try anything with your code.
John
on 8 Sep 2015
Answers (0)
Categories
Find more on Simulink Environment Customization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!