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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| function interface5_2(hp)
%disp(hp)
handles(1,1) = uibuttongroup('parent',hp,....
'visible','on','Position',[0 0 .2 1]);
handles(2,1)=uicontrol('parent',handles(1,1),...
'style','pushbutton',...
'units','normalized',...
'position',[0.01 0.94 0.20 0.05],...
'string','Ouvrir',...
'callback',{@recherche_fichier;hp},...
'tag','recherche_fic');
% Create the text uicontrol object result
handles(3,1)=uicontrol('parent',handles(1,1),...
'style','text',...
'units','normalized',...
'position',[0.23 0.95 0.75 0.0275],...
'string','Emplacement du fichier',...
'tag','chemin_fic');
% Create the text uicontrol object listbox
handles(4,1)=uicontrol('parent',handles(1,1),...
'style','listbox',...
'units','normalized',...
'position',[0.35 0.6 0.23 0.23],...
'string','voie',...
'max',3,...
'min',1,...
'tag','voie');
chemin='';
setappdata(gcf,'valeur_de_chemin',chemin);
function recherche_fichier(~,~,h)
.
.
.
x=.88;
y=1;
while x>0
u0(y,1) = uicontrol('parent',h,'Style','checkbox','String',y,...
'units','normalized','position',[.10 x .31 .02]);
x=x-.03;
y=y+1;
end |
Partager