how to add a photo in the background of an app in appdesigner

2 次查看(过去 30 天)
Capture.PNG
how can I use an image in the background instead of just using a color (the blue one)
is this possible

采纳的回答

Melissa Williams
Melissa Williams 2019-5-10
Hello,
The image component is available in App Designer as of MATLAB R2019a.
-Melissa

更多回答(1 个)

Melissa Williams
Melissa Williams 2019-5-10
You can put an axes as the background for your app and add a startup function to populate it with your image file.
function startupFcn(app)
myImage = imread('peppers.png');
image(app.UIAxes, myImage);
end
You will want to set UIAxes title, xLabel, yLabel to blank in the Property Editor on the lower right. And XTick and YTicks = []
Best of luck.
  5 个评论
AMINE EL MOUATAMID
AMINE EL MOUATAMID 2019-5-10
solved , the first time I add a function not a callback
now it works
thanks

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by