Wednesday, October 30, 2013

Focus or Caret on TextBox Control gone if ToolstripDropdown is shown.

Im trying to implement a custom textbox control with auto-suggest features. Upon rendering the ToolStripDropdown object just below the textbox control, the focus seems to be lost.

I found the trick by setting the AutoClose property to false in the Textbox OnHandleCreated(EventArgs e) event. See the code below:
Code:
 _dropDown.AutoClose = false; //ToolStripDropDown object 

Greg

0 comments:

Post a Comment