Borrar filtros
Borrar filtros

Disable Buttons in toolstrip on Simulink

5 visualizaciones (últimos 30 días)
suraj mate
suraj mate el 4 de Feb. de 2024
Comentada: suraj mate el 5 de Feb. de 2024
hi i have added my custom tab and in that i have my custom toolstrip and also custom buttons.
i have added these buttons using json file like
{
"version": "1.0",
"entries": [
{
"type": "Action",
"id": "Demo Button",
"text": "Connect",
"description": "Connect to API",
"icon": "loginIcon",
"command": "login",
"commandType": "Script"
},
{
"type": "Action",
"id": "requirementPopUpAction",
"text": "MyDemo",
"icon": "DemoIcon"
}
}
which create buttons like this
----------------------------
but now i want to disable these buttons how can i do that i got some refrences like this but i dont know how to access CM and what is CM and also what should be callbackInfo in may case.
function sl_customization(cm)
cm.addCustomFilterFcn('Simulink:NewModel',@myFilter);
end
function state = myFilter(callbackInfo)
state = 'Disabled';
end
  2 comentarios
Anjaneyulu Bairi
Anjaneyulu Bairi el 4 de Feb. de 2024
Hi,
Create a file sl_customization.m then add it to your path and run that file.
Hope it helps.
suraj mate
suraj mate el 5 de Feb. de 2024
thanks got the solution

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Simulink Environment Customization en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by