GUI Tab Panel Not Responsive
이전 댓글 표시
I created a GUI using GUI layout toolbox. In my code, I have something similar to:
gui = createGUI();
data = initData();
for ii = 1:data.num_trials
updateGui(gui, data);
...
data = intensiveProcessing(data);
end
For my GUI, I created a HBox with a tab panel as a child. There are three tabs (tab1, tab2, tab3). While I'm running the above code, my GUI is not responsive (presumably because of the processing that occurs inside of the intensiveProcessing function. As a result, if I want to select a different tab, the response time is pretty slow, and I have to continuosly click the tab that I want until the GUI finally responds and switches to the next tab's view. Is there a way to make the GUI more responsive? Granted, within the tabs, I plot data that is dependent on the intensive processing being completed, but I still want the ability to be able to change tabs and not have to wait until my code breaks out of the intensiveProcessing function. I tried adding a pause statement in between updateGui() and intensiveProcessing(), but that didn't solve the problem. The intensiveProcessing function takes about a minute to complete. I've even tried adding a callback for ButtonDownFcn and SelectionChangedFcn, where the function just calls the drawnow() function, but to no avail.
set(gui.tpanel, 'ButtonDownFcn', @refreshWindow);
set(gui.tpanel, 'SelectionChangedFcn', @refreshWindow);
댓글 수: 2
Walter Roberson
2019년 10월 3일
Do you have drawnow() calls sprinkled in the intensiveProcessing() code ?
Ivan Aguilar
2019년 10월 3일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!