The ability to change the size of uicontrol objects dynamically is not available in MATLAB.
To work around this issue, you can use the attached file "simple_extent_dynamic.m". This function will create a uicontrol object in the manner described in the summary and dynamically adjust the size of your pop-up menu. The size can be restricted with upper and/or lower bounds (commented), because of appearance, but it is possible to run the function without bounds too.
The attached file "simple_extent.m" finds the longest string of the cell array which should be displayed in the pop-up menu. Then it resizes the uicontrol with a certain calculation. You can also use bounds such as those shown in the function "simple_extent_dynamic.m".
Note: Both functions would need to be edited for a FontSize other than the default one and for configurations other than Windows XP 96 DPI.
Best Answer