I created an editable text box with a BackgroundColor of [0 0.7 0.7]. If I assign a value to the 'String' property while the 'Enable' setting is 'off', the resulting text box will be white isntead of the assigned BackgroundColor. This is contingent upon both setting the String value and the Enable off
%%works
fh=figure t=uicontrol(fh,'Style','edit','BackgroundColor',[0 .7 .7],'Enable','off') set(t,'Enable','on')%%works
fh2=figure t2=uicontrol(fh2,'Style','edit','BackgroundColor',[0 .7 .7]) set(t2,'String','Hello World') set(t2,'Enable','on') %%breaks
fh3=figure t3=uicontrol(fh3,'Style','edit','BackgroundColor',[0 .7 .7],'Enable','off') set(t3,'String','Hello World') set(t3,'Enable','on')
GUIs created in GUIDE are also affected.
Best Answer