1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
function test_panel
% Create the figure
f = figure('Units','characters',...
'Position',[30 10 120 35],...
'HandleVisibility','callback',...
'IntegerHandle','off',...
'Renderer','painters');
% Create the bottom uipanel
botPanel = uipanel('BorderType','etchedin',...
'Units','characters',...
'Userdata','OK',...
'Position',[1/20 1/20 119.9 8],...
'Parent',f);
set(botPanel);
end
function ligne(~,~,botPanel)
x=5;
y=2;
for k=1:4
uicontrol('Parent',botPanel,...
'style','text',...
'Units','characters',...
'Position', [x y 5 2],...
'string',num2str(k));
x=x+5;
y=y+1;
end
end |
Partager