How do I change the overall height of a pop-up menu UICONTROL?
2 views (last 30 days)
Show older comments
MathWorks Support Team
on 27 Jun 2009
Edited: MathWorks Support Team
on 18 Dec 2017
I create a simple GUI with a UICONTROL pop-up menu by entering the following at the MATLAB Command Prompt:
f = figure;
popup= uicontrol('style','popup',...
'units','normalized',...
'string',{'try this','try that'},...
'position',[.2 .3 .6 .4]);
How do I adjust the overall height of the control? Changing the height value in the Position property does not appear to do anything.
Accepted Answer
MathWorks Support Team
on 18 Dec 2017
The height of a pop-up menu is automatically determined by the size of the font, except for on a Mac, in which case the height cannot be modified. The value you specify for the height in the 'Position' property has no effect.
In general, pop-up menus are used to open and display a list of choices when pressed; when not open, a pop-up menu indicates only the current choice. Because of this designed behavior, manually increasing the height of a pop-up menu to display multiple options is not available and a listbox UICONTROL may be a better option to display both the selected and nonselected choices.
0 Comments
More Answers (0)
Categories
Find more on Graphics Objects in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!