Respuesta aceptada

Guillaume
Guillaume el 3 de Feb. de 2017
Editada: Guillaume el 3 de Feb. de 2017
h = errordlg('Error! Error!');
htext = findobj(h, 'Type', 'Text'); %find text control in dialog
htext.FontSize = 15; %set fontsize to whatever you want

4 comentarios

Thanks! But, I've realized, that the last line is wrong! There is an error: Warning: Struct field assignment overwrites a value with class "double". See MATLAB R14SP2 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning, for details. I've changed it to:
set(htext,'FontSize',25); %set fontsize to whatever you want
Guillaume
Guillaume el 3 de Feb. de 2017
The last line isn't wrong, but it requires a newish (>= R2014b) version of matlab.
Pre-R2014b, you indeed have to use set to set the FontSize.
Alexander Voznesensky
Alexander Voznesensky el 21 de Feb. de 2017
Hi again! Sorry, what about questdlg? It doesn't return a handle, it returns an answer.
choice = questdlg('Do you hear?','Channel2','Yes','No', 'Yes');
What I should do in this case to increase the font?
Guillaume
Guillaume el 21 de Feb. de 2017
You cannot modify the font size (or any other property for that matter) of a questdlg. You would have to create your own dialog from scratch, I'm afraid.
Or copy questdlg.m in your own folder, rename the file and modify the code to add an optional font size argument.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre App Building en Centro de ayuda y File Exchange.

Preguntada:

el 3 de Feb. de 2017

Comentada:

el 21 de Feb. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by