How do I resize some UICONTROLs in a GUI but not others?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
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??
Answers (2)
Doug Hull
on 31 Jan 2011
2 votes
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
on 31 Jan 2011
1 vote
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.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!