Hi there this is the code I have been working with and I want to know from an actual example on how to apply a change in font size to the error pop up window. I am aware of the modifiers, using "TeX Markups," but this is extremely not clear in that there are no simple examples. Can someone tell where '\fontsize{15} text' goes?
opts = struct('WindowStyle','replace',...
'Interpreter','tex')
f = errordlg('This is my error message')
The way its written it looks like this is where it goes, but this is clearly not correct.
f = errordlg('\fontsize{15}This is my error message')
Thank you for whowever can help me with this.
All the best!

 채택된 답변

Peter O
Peter O 2020년 10월 30일

1 개 추천

You've almost got it. The TeX formatting is correct. You need to include the interpreter and modality of the window in a struct as the 3rd argument, which means you also need to specify the title bar for the dialog window (I'm showing modal here, but 'non-modal' and 'replace' also work)
errordlg('\fontsize{15}This is my error', 'My Error Dialog', struct('Interpreter','TeX','WindowStyle','Modal'))

댓글 수: 1

Cameron Grace
Cameron Grace 2020년 10월 30일
Thank you, Peter! Man, I was wracking my brain on this one. I was not definitively not using the 3rd argument. I greatly appreciate the fast response!

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2020년 10월 30일

1 개 추천

f = errordlg('\fontsize{3}This is my error message', 'Woops', opts);
Where 'Woops' is the title to give to the dialog.

댓글 수: 1

Cameron Grace
Cameron Grace 2020년 10월 30일
Thank you as well Walter! These both did the trick.

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

카테고리

도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2020년 10월 30일

댓글:

2020년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by