radio button in a GUI

1 view (last 30 days)
zerr hamza
zerr hamza on 24 Jul 2013
Hello, I'm working on the images from a GUI matlab my problem is: I have two radioButton pushButton and I want to know how to link the three callback more exactemnt 1 radionbutton is for DICOM images and the 2nd is for jpeg images and pushbutton that is open is that I want is when I select the pushbutton opens the RadioButton1 me that dicom images that exist and when I select the 2nd radion button the pushbutton opens my jpeg images that exist, help me with a code for the three callback.
  1 Comment
David Sanchez
David Sanchez on 24 Jul 2013
Shorter sentences would make your question more legible. Could you try to explain again your problem? It would help contributors to better understand what is exactly what you need. At the other end, you would receive a quicker/more precise answer.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 24 Jul 2013
You don't need to do anything with the radio button callback functions. In the push button call back, have this code
radioButton1State = get(handles.radioButton1, 'Value');
radioButton2State = get(handles.radioButton2, 'Value');
if radioButton1State
% create dicom filename then open it.
end
if radioButton2State
% create jpg filename then open it.
end
  3 Comments
Jan
Jan on 24 Jul 2013
@zerr: Please fix this by your own. We cannot guess the fieldnames in your handles struct but you can find out this very easily. Because your question does not contain details, we cannot post code which runs seamlessly in your original code.
Andrew Reibold
Andrew Reibold on 24 Jul 2013
Edited: Andrew Reibold on 24 Jul 2013
Image Analyst's answer looks good to me * upvote :P
You need to replace the text 'radioButton1' with whatever the "tag" property of your object is. If you are in guide, you can find this information by going to the property editor or by simply double clicking the object

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!