Write bold text in a textbox - guide
Afficher commentaires plus anciens
How to write a bold text in a textbox in guide, from the code? Is this possible?
Réponse acceptée
Plus de réponses (2)
Image Analyst
le 12 Juin 2014
Try this (untested)
set(handles.text1, 'FontWeight', 'Bold');
Alan Meier
le 14 Juil 2020
For me the easiest solution I found is also described in the TextBox Properties documentation page from Matlab. I just added
'FontWeight','bold'
to my annotation box. Although this is not specifically mentioned in the annotation documentation it works fine. So I ended up with the following line:
dim = [.825 .2 .8 .65];
annotation('textbox',dim,'String','boldString','FitBoxToText','on','FontSize',14,'FontWeight','bold','linestyle','none');
1 commentaire
Image Analyst
le 14 Juil 2020
There are a lot of things you can change. They're not all explicitly spelled out in the annotation documentation but it is mentioned like this:
Each type of annotation object supports a different set of properties. For a full list of properties and descriptions for each type, see the associated property page.
- Line Properties
- Arrow Properties
- DoubleEndArrow Properties
- TextArrow Properties
- TextBox Properties
- Rectangle Properties
- Ellipse Properties
So it's not mentioned explicitly -- it's there, but there's an additional click you have to do.
Catégories
En savoir plus sur Report Generator Creation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!