Generate arrow keys in MATLAB gui
이전 댓글 표시
Hello all,
I am trying to generate a gui that has 4 arrow key buttons (arranged as the usually are on a keyboard). I figured this would be a simple task but after a couple hours of trying on my own and searching the web I cannot figure out how to get it done.
Here's what I've tried so far:
- Creating an axes object over top of the button and adding a latex arrow to the axes
- Setting the Cdata of the button to be a picture of an arrow
For the first attempt I got an arrow to display but I couldn't get the axes to appear over top of the push button. After some searching it appears like this may or may not be possible, and no one ever really gave a clear answer on the topic.
For the second attempt I loaded an image of an arrow using imread and then used
set(handles.rarrow,'cdata',rarrow_img)
where rarrow_img is the variable that I loaded the image data into. This just replaced the push button with a black box.
Anyway, any help on this would be greatly appreciated. All I'm really looking to get is something like http://www.101computing.net/wp/wp-content/uploads/arrowKeys.png where each button then has a function I have yet to write (I'm looking to do manual image correlation and want to give people the option of using the mouse if for some reason they don't like keyboards...)
NOTE: I am using MATLAB r2011a for Mac (yes I know it is very outdated)
Andrew
댓글 수: 1
Walter Roberson
2015년 6월 10일
uicontrols will always appear above axes elements before R2014b. From R2014b onwards, axes elements can appear on top of uicontrols.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 White에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!