Why am I unable to create a uimenu with the title "remove"?

1 view (last 30 days)
To reproduce this issue, type the following at the MATLAB command prompt:
f =uimenu(figure(1),'Label','remove')
Note that no menu item "remove" appears in the menubar of the figure. Now enter the following:
f =uimenu(figure(1),'Label','Remove')
Note that a menubar item "Remove" appears as expected.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 3 Nov 2021
Edited: MathWorks Support Team on 4 Nov 2021
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
The strings 'remove', 'default', and 'factory' are special strings in Handle Graphics. The purpose of these strings is discussed in Section 6 of the Handle Graphics and Properties Guide:
If a string of a uicontrol or label of a uimenu needs to be set to one of these special strings, prepend a backslash (\) to the string as shown in the example below
f =uimenu(figure(1),'Label','\remove')

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

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

Start Hunting!