Programmatic GUI: access mainGUI handles from subGUI

조회 수: 15 (최근 30일)
Lemikainen
Lemikainen 2012년 2월 10일
Hi, I´ve just decided to create GUI for my project programmatically, since my app is working with multiple tabs and I´ve found it very uncomfortable to manage it using GUIDE...
I´m just facing crucial problem... I´m unable to access my own created handle structure of mainGUI from external functions/subGUI. When using guide, it was quite simple using this code, in subGUI callback:
% get the data from the gui (Main_Program is main GUI mfile´s name)
mainGUIdata = guidata(Main_Program);
get(mainGUIdata.Terminal_Edit, 'String');
...
But with nonGUIDE GUI it just doesn't work. I can use guidata in mainGUI without any problems... I guess I'm just missing something during initialization of mainGUI. I've done some temporary solutions like passing hObject to subgui, it works in some cases, but not in all...
Does anyone have idea why i can't use it same way as in guide created files?
Maybe some association of handle structure with mainGUI filename... I've created handle structure using this:
h = guihandles(Main_Figure);
h.Send_Button = uicontrol...
thx

답변 (0개)

카테고리

Help CenterFile 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