How do I resize some UICONTROLs in a GUI but not others?

I have a gui that I need to view on screens of different sizes (13 inch laptop, 24-inch desktop). The gui is made up of a big graph with a title on the top and some data and control lists/radio buttons on the left hand side.
I've made my gui resizable but when I shrink it, the graph overlaps some things. How do I make it so the graph shrinks and nothing else??

回答 (2 件)

Doug Hull
Doug Hull 2011 年 1 月 31 日

2 投票

Basically, you are going to want to populate this callback with the code to do the resize based on the position (ie. size) of the figure window. You can do some calculations in this to take finer control over the size of the items on your GUI.
Jiro Doke
Jiro Doke 2011 年 1 月 31 日

1 投票

Doug's solution (using ResizeFcn) is the fundamental way of achieving your goal. There are a number of File Exchange submissions that help you with GUI layout. If you're not using GUIDE to create your GUI, you may be interested in some of them. The one that I like (one of the most extensive) is GUI Layout Toolbox.
I wrote a blog post about it here. From that post, you can access some of my other posts that highlight other GUI layout tools.

この質問は閉じられています。

タグ

質問済み:

2011 年 1 月 31 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by