Image as a background of a uicontrol or uipanel?
조회 수: 12 (최근 30일)
이전 댓글 표시
Hi, I am trying to make a UI that will work with my script. The goal is to use an image as a background and place buttons ontop of the image so that I can route to different parts of my script from there. Similar to a website design in terms of navigation. I am having a hard time getting my image to show up. any ideas on how i can do that in a uicontrol or uipanel? I have not found any good tutorials or discussions that show this.
댓글 수: 2
Geoff Hayes
2019년 6월 3일
Vadim - are you using GUIDE, App Designer, or are you programmatically creating your GUI?
채택된 답변
Walter Roberson
2019년 6월 3일
You cannot get an image to show up in uipanel, except by grabbing its JavaFrame and manipulating that.
You cannot get an image to show up on uicontrol, except for styles pushbutton, togglebutton, radiobutton, or checkbox, in which case the image would be displayed where the button would normally appear.
What you need to do is put up an axes, and then carefully position your ui controls over the axes. There will not be any connection between the axes and the controls: you cannot, for example, configure the controls to be relative to the axes position, or in data units: you can just have the coincidence of them happening to be in the same portion of the figure.
댓글 수: 2
Walter Roberson
2019년 6월 4일
In r2014a and earlier, uicontrol are on top of everything else except perhaps annotations. In R2014b and later then later objects should be on top of uicontrol but the z coordinates of uicontrol are not really well defined and are probably treated as 0.
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!