GUI with 2 uipanels, second axes not displaying
Ältere Kommentare anzeigen
Hi,
I have a GUI with two uipanels. I use a "Next" button on uipanel 1 to hide uipanel 1 and make uipanel 2 visible. I use a "Back" button on uipanel 2 to hide uipanel 2 and make uipanel 1 visible.
On both uipanels, I display an image. While the image on uipanel 1 displays fine, I cannot seem to get the image on uipanel 2 to display. Could someone please identify how to get the image on uipanel 2 to display?
Please find the 3 GUI files attached. Thanks in advance for your time and effort in responding!
9 Kommentare
Walter Roberson
am 4 Apr. 2014
I do not see anything obvious at the moment. Have you confirmed that the callbacks are being invoked? Have you put a breakpoint into the callback and stepped through it?
MechtEngineer
am 4 Apr. 2014
MechtEngineer
am 4 Apr. 2014
Walter Roberson
am 4 Apr. 2014
About all I can think of the moment that might help is to replace your calls of the form
axes(THIS);
imshow(THAT);
with
h = imshow(THAT, 'Parent', THIS);
And then for debugging
get(get(h, 'Parent'), 'Parent')
and compare that against the handles of the uipanel. And just to cross-check,
findall(0, 'type', 'uipanel')
and make sure that two show up (that the uipanel did not get assigned the same id)
MechtEngineer
am 4 Apr. 2014
MechtEngineer
am 4 Apr. 2014
MechtEngineer
am 4 Apr. 2014
Walter Roberson
am 4 Apr. 2014
If you stop in the routine that creates the GUI, just after the callbacks are created, and at the command line you put an image into the sensor axes, then if you manually make the first panel invisible and the sensor panel visible, then does the image show up?
MechtEngineer
am 6 Apr. 2014
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Images finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!