I am trying to set properties of 3 textbox based on the state of a radiobutton. If the radiobutton is selected, I want the textboxes to be grayed so the user cannot enter values. My code works if I set only one textbox. However, I can't get it to change all of teh textboxes at the same time. Here is my code so far:
if (get(handles.radiobutton1 ,'Value') == get(handles.radiobutton1 ,'Max')) set(handles.edit4,'Enable','off', 'BackgroundColor', 'gray') set(handles.edit5,'Enable','off', 'BackgroundColor', 'gray') set(handles.edit6,'Enable','off', 'BackgroundColor', 'gray')else set(handles.edit4,'Enable','on', 'BackgroundColor', 'white') set(handles.edit5,'Enable','on', 'BackgroundColor', 'white') set(handles.edit6,'Enable','on', 'BackgroundColor', 'white')end
Is there a way to use "set" to apply to more than one function handle at a time? Or why I can't I have multiple statements within my "if"?
Thank you in advance!
Best Answer