button to activate textboxes in GUI
이전 댓글 표시
Hi: How can i make it so that when i click on a button, it gathers information in textbox(s)? I have get(hObject, 'string') for my textbox, but how do i link this to another button? Thanks
채택된 답변
추가 답변 (1개)
Grzegorz Knor
2011년 9월 20일
You have to create callback function:
댓글 수: 2
Andy
2011년 9월 20일
Grzegorz Knor
2011년 9월 20일
function test
uicontrol('Style','pushbutton','String','read','callback',@pb_clbck)
h = uicontrol('Style','Edit','String','write me!',...
'Units','normalized','Position',[.4 .45 .2 .1]);
function pb_clbck(src,evnt)
disp(get(h,'String'))
end
end
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!