image not showing in front of button
1 view (last 30 days)
Show older comments
I have an appdesigner app. It is designed with grids. There is a grid with two columns. The right column of the grid is 10x wider than the left. There is a button that spans both the left and right grid. There is also an image on the left column of a "play" image.
When the app is initialized, I am expecting the image to be shown on top of the button, but it is not. Why?
For more information, this was working fine about an hour ago. I was in the middle of editing some code in appdesigner code editor, and then appdesigner just crashed. WTF? and since then, I am unable to see the image. Two images attached shows my Design View and the app once it is started (the one with the yellow question mark). I have tried: delete and added component back, making sure the path is correct... nothing seems to work. Any help is appreciated.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1567364/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1567369/image.png)
2 Comments
Image Analyst
on 13 Dec 2023
No idea unless we can try it ourselves. Can you attach the .mlapp file and the green triangle image?
Accepted Answer
prabhat kumar sharma
on 19 Dec 2023
Hello Quy,
I understand that you're facing issue with displaying an icon inside a button.
One possible solution to your problem is to incorporate the play icon directly into the button, rather than using it as a separate image in the left grid. To do this, upload your play image to the button's `Icon` property and set the `IconAlignment` property to ‘leftmargin’
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1572342/image.png)
I hope this resolves the issue.
5 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!