我想显示图像(文件路径)并在下面放置单元格。
不幸的是,图像消失了。这是带有图像的 GUI。我希望黄色单元格位于图像下方。
这是我更改后的 gui:
hFig = figure('Name','Step 3 of 4: Choose data for each image','Menubar','none', 'Resize','off', ...
'WindowStyle','modal', 'Position',[300 300 1150 500]);
set(gcf,'NumberTitle','off')
movegui(hFig, 'center');
%# top/bottom panels
S.fh = uipanel('Parent',hFig, 'BorderType','none', ...
'Units','normalized', 'Position',[0 0.002 1 0.28]);
Layout = GridLayout(S.fh, ...
'NumRows', 2, ...
'NumCols', 3, ...
'HGap', 10, ...
'VGap', 5, ...
'Margin', 10, ...
'CellMargin', 10, ...
'CellColor', 'y');
for RIdx = 1:Layout.NumRows
for CIdx = 1:Layout.NumCols
if (RIdx == 1)
UIArgs = {'Style','text', 'String',choice{CIdx}};
else
UIArgs = {'Style','edit', 'String',''};
end
hFig = Layout.Cell(RIdx,CIdx);
uicontrol(hFig, UIArgs{:});
end
end
S.pb = uicontrol('style','pushbutton',...
'units','pix',...
'position',[380 20 180 30],...
'string','Submit',...
'callback',{@pb_call});
S.pc = uicontrol('style','pushbutton',...
'units','pix',...
'position',[580 20 180 30],...
'string','change the image',...
'callback',{@pc_call});
Update(Layout);