Display image using HTML within app designer does not work
이전 댓글 표시
I am trying to include a HTML based guide within a matlap app. Most html markup is working fine. However, I cant get <img> to load up any pictures. I have some hope this is possible as a workaround was found in this thread (https://uk.mathworks.com/matlabcentral/answers/497260-figure-uitable-does-not-display-html-image-in-2019b) when images are placed inside a table. However, this workaround is not practical for my application.
I include some distilled code to illustrate the problem.
pic = fullfile(filepath,'Run_Button_Pic.png');
html = ['<img src="file:/' pic '" width="150" height="52"'];
html = ['<html>' html '</html>'];
% Doesnt work
%------------
fig = uifigure('Position',[561 497 333 239]);
h = uihtml(fig);
h.HTMLSource = html;
% Works
%------
uitable('Data', {html})
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!