When I run the following code in MATLAB:
h = uibuttongroup('pos', [0 0 .5 1]);r = uicontrol('sty', 'rad', 'parent', h);r1 = uicontrol('sty', 'rad', 'parent', h, 'pos', [20 60 60 20]);set(r, 'Callback', 'disp 11111');set(r1, 'Callback', 'disp 22222');f2=figure;copyobj(h, f2);
I receive the warning messages:
Warning: Callback for uicontrol of style radiobutton will be overwritten when added to a UIBUTTONGROUP.Use the SelectionChangeFcn property on the button group instead. > In uitools.uibuttongroup.childAddedCbk at 12 Warning: Callback for uicontrol of style radiobutton will be overwritten when added to a UIBUTTONGROUP.Use the SelectionChangeFcn property on the button group instead. > In uitools.uibuttongroup.childAddedCbk at 12
Best Answer