How do I change the overall height of a pop-up menu UICONTROL?

2 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 18 de Dic. de 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.

Más respuestas (0)

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by