MATLAB 2014b missing GUIDE elements

I started creating a GUIDE GUI in 2014a and have just upgraded to 2014b. I was aware that some GUI elements may be hidden due to the new graphics system. And, lo and behold, parts were "missing" when I ran it. I fixed these minor points and carried on.
However, larger parts of the GUI, which initially worked in 2014b, disappeared (as well as having the positions of some elements reset to [0,0,1,1]). So, with a big pot of coffee, away I went fixing it, moving things back and front and in and out of their parent panels. Then I re-ran my and GUI everything looks as it should.
The catch, however, is when I close and re-run GUIDE (after saving), big chunks of the GUI are not visible in GUIDE. When I run the GUI, however, everything is as it should be. I have re-tweak the GUI in GUIDE to make elements visible, and it all works fine. But again, saving and restarting GUIDE leaves elements hidden. The GUI, however, still looks as it should.
In short, my GUI works as it should, but it is a pain to edit with GUIDE because of the elements being hidden. This is my first GUI, so missing something really obvious is a possibility. I'm running 2014b, on OS X Mavericks.

8 个评论

Can you give screenshots, or even better attach your code or a simplified example of what you are working with? As of now, the question is too abstract to really answer.
Hi Doug,
Here is a screen grab of GUIDE in 2014a (the GUI is still in progress, and my current screen is too small to capture the entire GUIDE window, but is enough to show my problem)....
Here is the main GUI window run in 2014a..
Everything is OK, but note that the position of the blue "Component 1" checkbox in GUIDE looks distorted. This was introduced after opening it in 2014b. In the GUI it is OK, and the Position properties are all correct.
My 2014b GUIDE...
And the GUI in 2014b...
As I mentioned, I have tried moving things around in 2014b so that all of the elements are on top, but after saving and closing GUIDE reverts to the image above where the elements are hidden.
Cheers Greig
UPDATE:
I have just installed 2014b on a Windows 7 machine. I copied my GUI straight over after editing it on 2014a (on Mac). Opening it for the first time in GUIDE 2014b (Win) everything looked and ran fine. I save close the MATLAB session and reopened it (2014b Windows). As before, the GUI looks OK when run, but the same components as before are hidden in GUIDE.
I have attached a trimmed version of the GUI with only the sliders on the left hand side. It opens and runs OK in GUIDE 2014a. If I open it in 2014b and re-save it, that is when the components disappear.
Cheers
Greig
I am also having similar problem, but in my case R2014a was not involved at all. This is a UI started in R2014b, but seemingly suffering the same problem.
I have nested panels and some UI components inside the nested panel. I think it is the use of normalized units that is causing this problem because it worked fine before I changed the components and the panels to use normalized units.
Now my components keep disappearing from the panel.
My code changes the visibility of the panel, on and off according to a radio button and the components show initially if the UI is in the state where they should be visible, but after pressing the radio button to a state where they should be hidden they never reappear on returning to the state where they should be visible.
Also they keep disappearing in GUIDE despite me clearly positioning them on the panel (they are children of the panel - I have checked this both in GUIDE and the code in debug). The problem clearly seems to be something odd happening with the normalized units causing the components to be rendered somewhere off the panel because the position contains silly values > 1 in GUIDE for these hidden components after I carefully positioned them and made sure they had values < 1 for all elements of the 'Position' vector.
I am experiencing the same issue.
Even when I try to add new elements in GUIDE, they appear invisible on my screen. It seems GUIDE is very broken in 2014b.
Same problem here. Components inside panels works fine when I run the GUI, but inside GUIDE they are invisible. They are there, I can click them or select them from the object browser. I can change their properties etc etc.
BUT I CAN'T SEE THEM IN GUIDE
The units of these objects weren't normalized, but they were all hidden by default(they were meant to appear after a certain action).
I tried to upgrade to 2015a, but nothing changed.
I already ran both the updater tools. Nothing changed. I also told the panels to "Send to back". Again nothing changed.
I noticed however that even brand new components added to those panels are hidden.
UPDATE: I found that a simple cut & paste of the flawed object restore their appearance. However this screws up all the tags and the callbacks. This means a quite long work to fix everything again.
UPDATE2: If you undo (instead of paste) the Tags will be correct and the workaround still works. I wrote this below as proposed "solution" (more a workaround than a solution though).
I'm having the same problem. I also used nested panels in my GUI. Some panels disappear in both GUIDE and when I run the GUI.
Luca Amerio's fix works most of the time, but is there a "proper" solution yet?

请先登录,再进行评论。

 采纳的回答

Luca Amerio
Luca Amerio 2015-3-19
I found a work-around: if you cut (or delete) the panel and then UNDO, the panel's elements appears at their place. Pay attention not to PASTE because this screws up all the tags and the callbacks.
Once you save and re-open the gui, the elements are again invisible and the procedure has to be repeated.
A fast way is to open the gui and then "select all" (CTRL-A), delete (DEL) and undo (CTRL-Z). Everything will be then fine.

1 个评论

A useful work around, but hopefully something that will be fixed in a near future release.

请先登录,再进行评论。

更多回答(1 个)

Matt J
Matt J 2014-11-23
编辑:Matt J 2014-11-23

1 个评论

Hi Matt,
I have run both updater tools, but they don't pick up any problems for the code or the figure (before suffering the problem I am about to describe).
I'm working on a trimmed down version of the code to illustrate this problem. In the original GUI resize behaviour was set to "Proportional", so I tried turning it off and running it again, this is what I got (GUIDE still shows the same)...
But the graphics app gives this...
On closer inspection, the object browser shows that all the "missing" elements are there, but that there positions are now [0,0,0,0]. Resetting the resizing does nothing. Resizing and moving of some of the elements was a problem I had before, but not having all reset like this.
I'll work on getting a trimmed version that has the elements in their place, but are not displayed in GUIDE.
Cheers Greig

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by