Show image when i use dropdown button
3 次查看(过去 30 天)
显示 更早的评论
Hello! When i select for example "Argentina", i want to show the image in that location where the dropdown button is, but it opens another window. Can someone please help me?![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1581481/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1581481/image.png)
1 个评论
Ganesh
2024-1-3
编辑:Ganesh
2024-1-3
Hi Adrian-Stefan,
It's unclear as to what functions are currently being implemented, but a solution to this problem is stated below.
You can try using the "uiimage()" function in matlab to create an image component. You can modify the component on the callback() function when the dropdown option is clicked.
Please refer to the following documentation on using this function:
Hope this helps!
回答(1 个)
Adam Danz
2024-1-3
You need to specify the axes handle so the image is generated in the intended axes. For example,
image(app.UIAxes,__)
imagesc(app.UIAxes,__)
% etc...
The reason this is happening is because by default, the app's figure handle is not visible. That is, the figure's HandleVisibility is set to off. When you don't specify an axes handle, MATLAB looks for the current axes but can't find it because the figure's handle is not visible.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!