Proportional text font size, or editing font size when figure resize occurs?
조회 수: 7 (최근 30일)
이전 댓글 표시
I've had some problems with this, and after looking online I've never really had a satisfactory answer to this.
What I want to do with my gui is set the static text size to a default size on a 720p monitor, with preset a figure position. I consider this my default, if the user has a different resolution, the text size is changed appropriately. I can get literally EVERYTHING else to change proportionally, and there isn't a problem with it. Text though is just a nuisance.
I would appreciate any advice on how to do this intelligently. I can manually resize the text size and wrap it if needed, but I want a fast, elegant way to do it dynamically on resize without manual processes. Is this possible?
댓글 수: 0
채택된 답변
Dishant Arora
2015년 4월 15일
get(0 , 'ScreenSize') % Gives the default screen size in pixels
get(0 , 'ScreenPixelsPerInch') % Gives the default Resolution
And if you want to get screen size in inches:
set(0 , 'Units' , 'Inch')
Hopefully this might help you
댓글 수: 3
Dishant Arora
2015년 4월 16일
Check out the doucmentation for windows resize callback function.
fun = @newfig;
figure('ResizeFcn' , fun);
function newfig(src , event)
% Your Code
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!