how to change the edit box color in gui?

2 次查看(过去 30 天)
i want to change the background color of my edit box after i clicked my push button.
what i did was
a=get(handles.edit1,'string');
if a=='2';
set(handles.edit1,'BackgroundColor','red')
end
%these codes are under pushbutton1 callback function.
but still it doesnt change anything to my edit1 background.
what is wrong with it?
the command window doesnt say anything about any errors or mistakes111

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by