|
I've added a toolstrip textbox in the context menu, and want to close the menu when the user enters something in the textbox and then presses enter. But ContextMenuStrip.Close doesn't do it for me, nothing happends. Does this have to do with the textbox still being in focus? If so, how do i "unfocus" the textbox?
private void toolStripTextBox1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { menu.Close(); } }
|