How to add images in appdesigner?
Show older comments
classdef app1 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
UITable matlab.ui.control.Table
ReadDataButton matlab.ui.control.Button
ReadGuidanceButton matlab.ui.control.Button
GuidanceTextAreaLabel matlab.ui.control.Label
GuidanceTextArea matlab.ui.control.TextArea
FuseTextAreaLabel matlab.ui.control.Label
FuseTextArea matlab.ui.control.TextArea
ReadFuseButton matlab.ui.control.Button
Image matlab.ui.control.Image
end
% Callbacks that handle component events
methods (Access = private)
% Cell edit callback: UITable
function UITableCellEdit(app, event)
indices = event.Indices;
newData = event.NewData;
end
% Button pushed function: ReadDataButton
function ReadDataButtonPushed(app, event)
t = readtable("Kitap1.xlsx","Sheet",1);
app.UITable.Data = t;
app.UITable.ColumnName = t.Properties.VariableNames;
end
% Button pushed function: ReadGuidanceButton
function ReadGuidanceButtonPushed(app, event)
t = readtable("Kitap1.xlsx","Sheet",1);
app.UITable.Data = t;
app.UITable.ColumnName = t.Properties.VariableNames;
%t=t(strcmp(t.Guidance,app.GuidanceTextArea.Value),:);
%t=t(startsWith(t.Guidance,app.GuidanceTextArea.Value),:);
t=t(contains(t.Guidance,app.GuidanceTextArea.Value),:);
app.UITable.Data=t;
end
% Button pushed function: ReadFuseButton
function ReadFuseButtonPushed(app, event)
t = readtable("Kitap1.xlsx","Sheet",1);
app.UITable.Data = t;
app.UITable.ColumnName = t.Properties.VariableNames;
%t=t(strcmp(t.Fuse,app.FuseTextArea.Value),:);
%t=t(startsWith(t.Fuse,app.FuseTextArea.Value),:);
t=t(contains(t.Fuse,app.FuseTextArea.Value),:);
app.UITable.Data=t;
end
% Image clicked function: Image
function ImageClicked(app, event)
end
end

I have this code and this app. When I clicked Read Data, excel datas comes. But I want to images. For example when I clicked on one of the data as seen in the figure, I want the photo of the clicked one in the image location at the right. How can I do that? Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on Develop Apps Using App Designer 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!