How to prevent Enter press from closing menu
I'm embedding a Colour Picker into a Context Menu using the Windows.Forms.ToolStripControlHost class. The picker displays fine and handles all mouse events properly:

![enter image description here][2]

The problem arises when one of the channel sliders is double clicked. This causes the control to add a Windows.Forms.TextBox into the parent control with the same dimensions as the slider so users can enter numeric values. When Enter is pressed while the TextBox has focus, it should assign the value and hide the textbox (which it does), but it also closes the entire menu structure. So, how do I keep the menu alive?

![enter image description here][3]

There's an awful lot of code involved but I'll post it if needed.

  [2]: http://i.stack.imgur.com/rkPxn.png
  [3]: http://i.stack.imgur.com/wxQt0.png
How to prevent Enter press from closing menu
===

I'm embedding a Colour Picker into a Context Menu using the Windows.Forms.ToolStripControlHost class. The picker displays fine and handles all mouse events properly:

![enter image description here][2]

The problem arises when one of the channel sliders is double clicked. This causes the control to add a Windows.Forms.TextBox into the parent control with the same dimensions as the slider so users can enter numeric values. When Enter is pressed while the TextBox has focus, it should assign the value and hide the textbox (which it does), but it also closes the entire menu structure. So, how do I keep the menu alive?

![enter image description here][3]

There's an awful lot of code involved but I'll post it if needed.

  [2]: http://i.stack.imgur.com/rkPxn.png
  [3]: http://i.stack.imgur.com/wxQt0.png