MATLAB: How to change the color of static text when we press the push button ,program please

MATLABmatlab gui

Best Answer

set( handles.textA, 'BackgroundColor', get( hObject, 'BackgroundColor' ) )
in your pushbutton callback, where handles.textA should be replaced by whatever your tag is for the static text.