i have 3 gui in my project named "MainGUI" and "Sub1GUi" and "Sub2GUi".... in SubGUi i have a button.... on click of that button i want one output to get displayed in the MainGUI axes2... how to call MainGUI and display image in MainGUI's axes2... is this possible... please do reply....

 채택된 답변

Jan
Jan 2013년 3월 4일

1 개 추천

This is an evergreen question. Please search for "sharing GUI" in this forum to find a bunch of solutions.
The object you have to share is the handle of the AXES object you want to plot in. So get the MainGUI's handle from the SubGUI, use it to obtain the handles struct by GUIDATA, and plot from the code of the SubGUI using the AXES' handle as 'Parent' property.

댓글 수: 4

Elysi Cochin
Elysi Cochin 2013년 3월 5일
sir i didnt get that... please can u show me....
Elysi Cochin
Elysi Cochin 2013년 3월 5일
편집: Elysi Cochin 2013년 3월 5일
In a button in SUBGUI i wrote like this
h = guihandles(MainFile);
axes(handles.axes1); imshow(I); axis equal;axis off;
but nothing is getting displayed.... please do reply.....
Elysi Cochin
Elysi Cochin 2013년 3월 5일
sir i tried many ways....but not getting it.... please do reply....
Jan
Jan 2013년 3월 5일
What could I reply? "Nothing is displayed" does not contain enough information to suggest an improvement. I do not expect than "guihandles(MainFile)" does, what you want, but as long as I do not know the contents of MainFile, this is a pure guessing. In addition you obtain h, but use handles afterwards. You need the handle of the MainGUI. I do not know, if you provide it, when the subGUI is created or if you can identify the mainGUI by its tag. But if you have the handle:
mainHandles = guidata(MainGUIH);
axes(mainHandles.axes1);
imshow(I);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 WLAN Toolbox에 대해 자세히 알아보기

태그

질문:

2013년 3월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by