Highlighting handles in figure
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a separate code with a functions, switch and cases. The purpose of this code is to play a note for every keypress (case). And I have a separate GUI which has piano tangent. So I have opened this GUI succesfully in my code by h = openfig('file.fig').
So my problem is to select a handle (piano tangent) for each case (keypress note) and highlight the handle.
But I have not found anything to solve this problem when I searched on google except handles=guihandles(object_handle). So I wrote it down in one of the case-sequences with the tagname for a tangent in the parentheses, but it stays of course unused since I must write something else to highlight the tangent.
댓글 수: 2
Adam
2014년 11월 7일
Sorry, I'm not understanding your question here. The terminology of a piano tangent is unfamiliar to me and I'm not 100% sure what you are referring to as a handle in this case.
I assume your GUI is a static one as calling openfig will not run it as an active program, only open the last saved state of the .fig file.
답변 (3개)
Adam
2014년 11월 14일
You just need to set a callback for your button and then in the callback you can call any other function or script.
Depending whether your GUI is in GUIDE or done programatically this would be done in different ways and if you want to store results from the output of your separate code then again that involves a little more work dependent on how you are creating and accessing your GUI.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!