title: Dynamically updating text in Matlab GUI
body: <p>I think it should be pretty simple what I want to do, basically I have one edit box that displays a value in percentages and another that I want to update to display raw values. I've tried using the following code under the edit1 (percent) callback:</p>
  
  <pre><code>currentKey = str2num(get(gcf,'CurrentKey'));
  percent = str2num(get(handles.edit1,'String'));
  if ~isnan(currentKey) &amp;&amp; ~isnan(percent) &amp;&amp; 0&lt;=percent &amp;&amp; percent&lt;=100
      set(handles.edit2,'String',num2str(2*percent))
  end
  </code></pre>
  
  <p>But it will only update the second edit box if I first click outside of the first one. Anyone have an idea of what I should be doing?</p>
  
  <p>Thanks!</p>