Problem with FONTSIZE on inputdlg
21 ビュー (過去 30 日間)
古いコメントを表示
Davide Di Luzio
2022 年 4 月 11 日
コメント済み: Walter Roberson
2022 年 4 月 11 日
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 ? ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/960155/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/960155/image.jpeg)
0 件のコメント
採用された回答
Walter Roberson
2022 年 4 月 11 日
編集済み: Walter Roberson
2022 年 4 月 11 日
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 件のコメント
Walter Roberson
2022 年 4 月 11 日
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!