Handle tab key in ToolStripComboBox

Posted by Jiri on Stack Overflow See other posts from Stack Overflow or by Jiri
Published on 2010-05-25T13:16:55Z Indexed on 2010/05/25 13:21 UTC
Read the original article Hit count: 507

Hi,

I have a ToolStripComboBox in a ToolStrip, and when I press TAB key in it, it gives focus to the next toolstrip button. I would like to change this behavior and give focus to a richtextbox on my form instead.

The problem is that ToolStripComboBox does not have PreviewKeyDown event. And PreviewKeyDown of the hosting ToolStrip Toolbar is not called when tab key is pressed in the combo (just when pressed and some toolstripbutton is focused).

TabStop of the toolstrip toolbar is false.

Any ideas?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about usercontrols