Radio buttons without GUIDE
显示 更早的评论
hi, i need to use radio buttons in my project.i've this code:
rd1 = uicontrol('style','radio',...
'units','pix',...
'position',[500 410 15 15],...
'string','',...
'callback',{@rd1_call});
function [] = rd1_call(src1){
f = make_subgui;
% error when it tries to execute the callback otherwise.
set(src,'deletefcn',{@fig_delet,f})}
i want to check the radio buttons but when it closes all the GUI's or stop the running program i want to un-check that, how can i do that?
回答(1 个)
Fangjun Jiang
2011-9-4
0 个投票
You can add that "un-check the radio buttons" command inside the CloseRequestFcn callback function.
6 个评论
Nu9
2011-9-4
Fangjun Jiang
2011-9-4
Where did you put the above code? I don't understand what do you mean by get(src,'Max') and set(src,'Value', 'Min')
Nu9
2011-9-4
Nu9
2011-9-4
Fangjun Jiang
2011-9-4
Okay, then you need to use the SelectionChangeFcn callback. Search that on that page and follow the example.
Nu9
2011-9-4
类别
在 帮助中心 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!