How to change text style in static text box in matlab GUI?

6 ビュー (過去 30 日間)
Andrew Poissant
Andrew Poissant 2018 年 10 月 23 日
コメント済み: Adam Danz 2018 年 10 月 27 日
I made a matlab GUI in GUIDE and I have a static text box that is updated. I use the code below to add text underneath the text that is in the static text box by default (See attached screenshot for look at the GUI). My question is how do I change the look of the text I am adding with the code below without changing the look of the text already in the static text box at the beginning of the plotting command? More simply, I want to add more words in the static text box but have the text be normal (no bold font) and smaller than the "UAV Mission Plan Updates" text that is in the GUI by default.
addText = sprintf('- UAV executing mission plan');
origtxt = get(handles.text2,'String');
set(handles.text2, 'String', {origtxt, addText}, 'FontWeight', 'normal'); % FontWeight command changes all of the text, not just the addText portion
  6 件のコメント
Andrew Poissant
Andrew Poissant 2018 年 10 月 26 日
I am not sure how to do what you said. I can't use a second static text box because the number of new text strings that occur in my static text box will vary. If I knew the number of texts that would occur ahead of time then I would try that.
Adam Danz
Adam Danz 2018 年 10 月 27 日
Use the HTML method that Jan pointed out.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by