title: How to use combobox.Text after Keydown event in Winforms
body: <p>I am using a combobox without the dropdown to accept text input only. On the windows form I have an OK button which calls a function that uses the combobox.Text property. </p>
  
  <p>The problem is that I want to call this function when the user types something then hits ENTER. I am trying to handle the KeyDown event (I have tried other events with much the same results) but I find that combobox.Text is null after this is fired. I want something like this to work ideally:</p>
  
  <pre><code>private void cbox_KeyDown(object sender, KeyEventArgs e)
          {
              if (e.KeyValue == 13)
          {
              OK(cbox.Text); 
          }
      }  
  </code></pre>
  
  <p>Why is combobox.Text wiped after the KeyDown event? This same problem wouldn't happen with a Textbox right? I'm nearly desperate enough but I don't want to replace this box on every form in the program lol... Please advise!</p>