title: How do I enable button while there is a string in my textbox?
body: <p>I have a textbox and a button in form2. When an item is clicked in form1, form2 appears. I would like to keep the button in form2 disabled while the textbox is empty, but when user starts typing, I'd like to enable the button.</p>
  
  <p>I have tried using an if in my constructor after the initialisecomponent() like so, but it does not work:</p>
  
  <pre><code>if(textbox1.text != "")
  {
     btnOne.Enabled = true;
  }
  </code></pre>
  
  <p>I have also tried calling a method called <code>checkText()</code> after the initialise component which uses a do-while loop to check like: </p>
  
  <pre><code>do{
      btnOne.Enabled = true
    }
   while(textbox1.text != "");
  </code></pre>
  
  <p>Can anyone help?</p>