MATLAB: There is no Text property on the Menu class

label;MATLABtext;uimenu

I try to create simple menu in the Matlab R2017a
h_f = figure('MenuBar','none','ToolBar','none');
h_menu = uimenu(h_f,'Text','Run');
but receive an error 'There is no Text property on the Menu class'.
For some reasons if I change it to
h_f = figure('MenuBar','none','ToolBar','none');
h_menu = uimenu(h_f,'Label','Run');
it works properly, while Matlab Help states that 'Use of the Label property is not recommended. It might be removed in a future release. Use the Text property instead'.
So where is the problem? 'Text' property was introduced only in the R2017b version?
Also I want to create submenus and this code doesn't work
h_menu_item = uimenu(h_menu,'Label','Ready','Label','Steady','Label','Go');
But this works:
h_menu_item = uimenu(h_menu,'Label','Ready');
h_menu_item = uimenu(h_menu,'Label','Steady');
h_menu_item = uimenu(h_menu,'Label','Go');
Why I couldn't concatenate it in one line?

Best Answer

Yes, Text does appear to have been introduced in R2017b, and I do not see the change described in the release notes.
You cannot put those three items in one line because you are creating three different graphics objects, not a single graphics object with a list of character vectors.