how to change the edit box color in gui?

2 views (last 30 days)
Fatma Al-Sharji
Fatma Al-Sharji on 23 Apr 2015
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

Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!