title: Enabling and Disabling GUI button Matlab
body: <p>This is a very strange problem, because I am quite sure the logic is proper but it is still not working. So when the GUI starts, in the starting function, I set most of the buttons to be inactivated using the following line of code for every button, Kbutton, Bbutton etc..:</p>
  
  <pre><code>set(handles.Kbutton,'Enable','off');
  set(handles.Bbutton,'Enable','off');
  </code></pre>
  
  <p>Then, when the user clicks on any cell in the uitable, I use the cell selection callback to get the info about the contents of the cell, and re-activate the buttons that can be used from then on:</p>
  
  <pre><code>set(handles.Kbutton,'Enable','on');
  set(handles.Bbutton,'Enable','on');
  </code></pre>
  
  <p>And till now everything is ok.
  So then the user clicks on a button, say Kbutton, and the underlying function is executed thanks to the button's callback function. Once the method is ready I would like to return the buttons to their initial state i.e. inactivated. So logic tells me, re-put the initial line of code at the end of the callback function and done:</p>
  
  <pre><code>set(hObject,'Enable','off');
  drawnow;
  set(handles.BButton,'Enable','off');
  drawnow;
  </code></pre>
  
  <p>Where the first line of code in the above snippet, refers to the button who fired the callback and BButton is any other button in the GUI.</p>
  
  <p>For some strange reason only the second one is being enabled off. I.e. the button that fired the callback is staying enabled on :/</p>
  
  <p>Has anyone encountered the same problem?
  Any ideas?</p>
  
  <p>Thanks in advance</p>