setting radiobutton value by program
12 次查看(过去 30 天)
显示 更早的评论
I have a panel with several radiobuttons so that only one of them is selected at the time, it works fine with my mouse. However, I want to create a pushbutton that when I push it will select a specific radiobutton on the panel
So for example I have radiobuttons A B and C and I clicked on C at one time then with the pushbutton I want to set A again as if I have clicked A with my mouse.. how can I do that??
Thank you in advance...
0 个评论
采纳的回答
Image Analyst
2015-1-28
Yes. Do it this way:
set(handles.radioA, 'Value', 1);
If the other B & C radio buttons are in a group panel, then the B & C radio buttons will automatically be set to false once this line executes . Otherwise you can set them to false manually with the set() function also.
2 个评论
Image Analyst
2015-1-28
编辑:Image Analyst
2015-1-28
Diego's "Answer" moved here since it's not an answer to the original question:
thank you very much
Image Analyst
2015-1-28
You're welcome. If that worked for you, maybe you can officially mark the Answer as "Accepted" (Thanks in advance).
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!