MATLAB Answers

Using GUIDE GUI was build in Matlab 2014b but now not opening properly in 2016b

1 view (last 30 days)
Abdurrehman on 21 Feb 2017
Commented: Walter Roberson on 22 Feb 2017
I had made GUI in guide with Matlab 2014b now opening it is 2016a but some buttons are not shown on screen. Is this due to screen size? (because I had made this GUI on a PC having 22" screen size and now opening it on a 15" Screen)
Does the Matlab automatically scales the objects used in GUI (e.g. Axes etc) when opened on different screen size/resolution?


Sign in to comment.

Accepted Answer

Jan on 22 Feb 2017
You can defined the figure position and size relative to the screen or with absolute coordinates, see 'normalized' or 'pixel' units. The same can be done with all GUI elements like axes, uipanel and uicontrol relative to the figure. Therefore I is possible, that the layout depend on the screen size.


Muhammad Abdurrehman
Muhammad Abdurrehman on 22 Feb 2017
I just checked In GUI Options Resize Behavior: there are three options
- Non-resizeable - Proportional - Other (Size Changed Function)
Can you please explain which function in last two options should be selected or how to write SizeChangedFcn?
Walter Roberson
Walter Roberson on 22 Feb 2017
Select Proportional if you want everything to be resized to 15/22. This might include text size.
Select Size Changed Function and provide code if you want to change the way you arrange your graphics elements based upon screen size. For example, you might want
Plot1 Plot2 Plot3
side by side on a wide screen, but on a narrower screen instead of making each plot 2/3 the size, you might want to arrange as
Plot1 Plot2
Plot3 Description
The function you provided would have to examine the figure size and make decisions about what to place where.

Sign in to comment.

More Answers (0)