- http://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents
- http://undocumentedmatlab.com/blog/rich-matlab-editbox-contents
Write bold text in a textbox - guide
912 ビュー (過去 30 日間)
古いコメントを表示
How to write a bold text in a textbox in guide, from the code? Is this possible?
0 件のコメント
採用された回答
per isakson
2014 年 6 月 12 日
編集済み: per isakson
2014 年 6 月 13 日
Correction:
FontWeight
light | {normal} | demi | bold
Weight of text characters. MATLAB uses this property to select a
font from those available on your particular system. Setting this
property to bold causes MATLAB to use a bold version of the font,
when it is available on your system.
Example
figure;
uicontrol( 'style', 'text', 'string', 'abcd1234', 'fontweight', 'bold' )
.
Original answer:
AFAIK: No, but see
and
その他の回答 (2 件)
Alan Meier
2020 年 7 月 14 日
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 件のコメント
Image Analyst
2020 年 7 月 14 日
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.
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!