Change the order of the menu bar`s items of the model

6 次查看(过去 30 天)
I used sl_customization to add a new item to the model's menu. Now I want to change the order of the items.
Is this possible ? I searched the internet but couldn't find any articles related to this.
Thanks in advance !
Adrian

回答(1 个)

TAB
TAB 2012-8-28
编辑:TAB 2012-8-28
You can not change the order of Tool menu items which are predefined. But you can change the order of items added by you.
Custom menu items appears in the sequence in which they are assigned in cell array in the definition of custom menu function.
% Register custom menu function.
function sl_customization(cm)
cm.addCustomMenuFcn('Simulink:ToolsMenu', @MyMenuItems);
end
% Define the custom menu function.
function schemaFcns = MyMenuItems(callbackInfo)
%------You can change the sequence in the below line------
schemaFcns = {@getItem1,@getItem2,@getItem3,@getItem4};
end

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by