Multiple Font Sizes in for a label in app designer

조회 수: 6 (최근 30일)
Leon
Leon 2022년 6월 9일
댓글: Leon 2022년 6월 10일
I am using a label in Appdesigner. However I want to use multiple Font Sizes in one label. How can this be done?
I use the code below. Using the Label in the title of a plot is work well, I get different FondSize, However when I use the same Label in appdesigner it does not work???
Thx for your support
Label = sprintf('%s',['fontsize{12}', num2str(5,5555,'%1.4f'),'\fontsize{10}',num2str(6)]);
%% as title in figure it works
figure();
plot((1:10).^2);
title(Label);
%% does not work for a label in app designer
app.Label.Text = Label;

채택된 답변

Alberto Cuadra Lara
Alberto Cuadra Lara 2022년 6월 9일
Hello Leon,
I'm not sure if this is possible, because the font size is a property of the Label class. My approach would be to use two labels aligned using the desired font sizes.
Best,
Alberto
  댓글 수: 1
Leon
Leon 2022년 6월 10일
Hello Alberto,
Thx for your suggestion. I think it not the most beautiful one but I think you are right, I don't think it is possible. And I tried a lot.
Your suggestion will do the trick, also if I resize the figure they stay connected.
BR
Leon

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by