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
| function questionnaire
%création de la fenêtre du questionnaire
Main = figure('units','normalized',...
'position',[0 0 1 1],...
'color','b','numbertitle','off',...
'DeleteFcn', @delete,...
'MenuBar', 'none',...
'name','Data architecture builder');
% Affichage du questionnaire
X = imread('gew.jpg', 'jpg'); % Charge l'image
ax = axes('Units', 'Normalized', 'Position', [0 0 1 1]); % Création d'un objet Axes prenant toute la fenêtre
imagesc(X, 'Parent', ax) % Affiche l'image
uistack(ax, 'bottom') % Place l'objet Axes en arrière-plan
set(ax, 'Visible', 'off') % Cache les marques "ticks"
bg = uibuttongroup(Main,'Visible','off',...
'Position',[0 0 0.2 0.2],...
'SelectionChangedFcn',@bselection);
% Create three radio buttons in the button group.
r1 = uicontrol(bg,'Style',...
'radiobutton',...
'String','Option 1',...
'Position',[10 350 100 30],...
'HandleVisibility','off');
r2 = uicontrol(bg,'Style','radiobutton',...
'String','Option 2',...
'Position',[10 250 100 30],...
'HandleVisibility','off');
r3 = uicontrol(bg,'Style','radiobutton',...
'String','Option 3',...
'Position',[10 150 100 30],...
'HandleVisibility','off');
% Make the uibuttongroup visible after creating child objects.
bg.Visible = 'on';
function bselection(source,callbackdata)
display(['Previous: ' callbackdata.OldValue.String]);
display(['Current: ' callbackdata.NewValue.String]);
display('------------------');
end
end |
Partager