auto resize static text in GUI

조회 수: 11 (최근 30일)
chlor thanks
chlor thanks 2016년 8월 2일
편집: chlor thanks 2016년 8월 3일
My GUI is made in GUIDE.
All components of the GUI have the units normalized.
GUI options is set to be proportional.
Issue:
After I run the GUI and manually drag and change window size, everything resizes itself as expected including the static text box, however, the static text inside the text box stays the same Font size as I manually set earlier in GUI Editor and no longer fit in the text box.
Goal:
I wish to auto rescale my static text to fit in the text box.
Please help...Thank you~

답변 (2개)

Image Analyst
Image Analyst 2016년 8월 3일
Make sure the units property is set to 'normalized', and then make sure it's wide enough otherwise it will clip it off.
  댓글 수: 1
chlor thanks
chlor thanks 2016년 8월 3일
편집: chlor thanks 2016년 8월 3일
Thank you for commenting! After double checking, all my units are normalized. And I made sure they are wide enough, but the issue is still there.

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


Adam
Adam 2016년 8월 3일
There is a 'FontUnits' property which needs to be set to 'normalized' for this to work.
I seem to remember I abandoned this because it really didn't work well, I ended up with buttons with slightly differing sizes of font even though the buttons had been made to be the same size and overall it just looked an inconsistent mess at different levels of resizing, but you can judge for yourself if you use the setting.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by