Borrar filtros
Borrar filtros

Problem with FONTSIZE on inputdlg

21 visualizaciones (últimos 30 días)
Davide Di Luzio
Davide Di Luzio el 11 de Abr. de 2022
Comentada: Walter Roberson el 11 de Abr. de 2022
HI.
my problem is that when my font size is bigger than some value, inputdlg function cut vertically the font as you can see in the function.
But is not possible for Matlab to resize vertically the window that inputdlg creates.
How can i solve this problem ?

Respuesta aceptada

Walter Roberson
Walter Roberson el 11 de Abr. de 2022
Editada: Walter Roberson el 11 de Abr. de 2022
What you need to do is take a copy of the code, renaming it to a different function, and edit the line
TextInfo.FontSize = get(0,'FactoryUicontrolFontSize');
to become
TextInfo.FontSize = get(0,'DefaultUicontrolFontSize');
After that, in order to change the font size, just before calling inputdlg(), use
oldsize = get(0, 'DefaultUicontrolFontSize');
set(0, 'DefaultUicontrolFontSize', SIZE_YOU_WANT);
then call inputdlg(), and then
set(0, 'DefaultUicontrolFontSize', oldsize);
  4 comentarios
Davide Di Luzio
Davide Di Luzio el 11 de Abr. de 2022
Editada: Davide Di Luzio el 11 de Abr. de 2022
i have already made the modification but there was this error :
"Unrecognized function or variable 'getnicedialoglocation'.
Error in myinputdlg (line 322)
set(InputFig,'Position',getnicedialoglocation(FigPos,get(InputFig,'Units')));
Error in tipo3A (line 122)
lk = myinputdlg(prompt,dlgtitle,dims,definput,options)"
seem that matlab lost a link with an inside function of my inputdlg modified
Walter Roberson
Walter Roberson el 11 de Abr. de 2022
Copy toolbox/matlab/uitools/private/getnicedialoglocation.m to a directory named private in the directory you stored myinputdlg
You might need to copy some other functions as well.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by