How to change color of a block in simulink when you perform copy
Afficher commentaires plus anciens
I'm trying to create a way to automatically change block colors when you do a copy in the model. I know how to change the colors, now I just need to be able to either do the copy, or figure out how to trigger the color change when a copy happens
Réponses (1)
Sebastian Castro
le 13 Avr 2015
- Right-click the block and select "Properties"
- Go to the "Callbacks" tab
- Enter the following code (for example) in the CopyFcn callback:
set_param(gcb,'BackgroundColor','red');
- Sebastian
2 commentaires
VENKATA PRASANTH KUMAR VULIMIRI
le 16 Fév 2017
My call backs tab is not highlighting...hence i am unable to change my colour of block.Please tell me how i can get the exact colours.
Avhidipta Mondal
le 25 Nov 2017
Right click on the block, Select format, Background color.
Catégories
En savoir plus sur Model, Block, and Port Callbacks dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!