MATLAB Answers

0

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

Asked by Abdurrehman on 21 Feb 2017
Latest activity Commented on by Walter Roberson
on 22 Feb 2017
Accepted Answer by Jan
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?

  0 Comments

Sign in to comment.

1 Answer

Answer by Jan
on 22 Feb 2017
 Accepted Answer

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.

  2 Comments

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?
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
Description
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.