how to get toggling effect in radio buttons?

조회 수: 1 (최근 30일)
preeti
preeti 2015년 4월 25일
댓글: Michael Haderlein 2015년 4월 27일
This code creates 3 options for user but I want slight changes here.First by clicking option 1 it must display image in axes1. But after radio button is again toggled as if no choice is made that axes should not have same image it should be empty.
Sorry in figure I cant show the axes at right plane.
h = uibuttongroup('visible','off','Position',[0 0 .2 1]);
u0 = uicontrol('Style','Radio','String','Option 1',...
'pos',[10 350 100 30],'parent',h,'HandleVisibility','off');
u1 = uicontrol('Style','Radio','String','Option 2',...
'pos',[10 250 100 30],'parent',h,'HandleVisibility','off');
u2 = uicontrol('Style','Radio','String','Option 3',...
'pos',[10 150 100 30],'parent',h,'HandleVisibility','off');
set(h,'SelectionChangeFcn', 'disp selectionChanged');
set(h,'SelectedObject',[]); % No selection
set(h,'Visible','on');
  댓글 수: 5
preeti
preeti 2015년 4월 27일
편집: preeti 2015년 4월 27일
No I hav'nt tried it yet ...
Michael Haderlein
Michael Haderlein 2015년 4월 27일
Also, what Jan meant (I think): Usually people use checkboxes for such purpose.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by