You can assign a callback to the checkbox that will change the FontSize property of the text.
Example:
f= figure
txt = uicontrol('Style','text',...
'String','hello','Tag','txt1')
check_box = uicontrol('Style','checkbox',...
'callback',@edit_txt)
Now you can define the callback as:
function edit_txt(Obj_handle, event)
t = findobj(gcf,'Tag','txt1')
if Obj_handle.Value == 0
t.FontSize = 8;
else
t.FontSize = 30;
end
end
Best Answer