Borrar filtros
Borrar filtros

My GUI in Matlab R2010b does not work in R2015a

2 visualizaciones (últimos 30 días)
Jun
Jun el 20 de En. de 2016
Comentada: Jun el 21 de En. de 2016
I have a GUI written in R2010b version of Matlab. Now when I tried to run that GUI within matlab, or to edit the fig file, I found that several items were not there anymore, including some all list boxes and some text boxes. The same GUI and fig file can be used on another computer still running R2010b. Does any one know a good solution how to make that GUI running under R2015a?

Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de En. de 2016
The boxes are very likely there but hidden away.
Up to R2014a, uicontrol() always showed up on top, no matter how many things were drawn above them. As of R2014b, the layer is paid attention to, so if you put something above a uicontrol, the uicontrol will be hidden behind it.
Unfortunately, GUIDE is known to have constructed some GUI in which it parented the uicontrol to the wrong layer. For example when a uipanel was created and things were added that were visually on top of that, GUIDE sometimes parented them against the original figure instead of against the uipanel. Then when the uipanel is rendered in R2014b or later, it is visually on top and hides the controls.
You need to go back in to GUIDE and fix the Parent of all of those objects. Or you can write a little bit of code that finds the objects and changes their Parent at run-time. For example if handles.editbox2, handles.checkbox7, handles.pushbutton1, and handles.textbox1 2 and 3 are all intended to be part of handles.uipanel3, then
set([handles.editbox2, handles.checkbox7, handles.pushbutton1, handles.textbox1, handles.textbox2, handles.textbox3], 'Parent', handles.uipanel3)
You would want to do that just after the call to gui_mainfcn() in the first routine in your .m file.
  1 comentario
Jun
Jun el 21 de En. de 2016
Thanks so much! It is exactly the issue. I solved this by changing the boxes in guide, following your suggestions.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by