System.Windows.Forms.ToolStripTextBox (.NET 2.0.50727, Visual Studio .NET 2005)

  • Thread starter Kjetil Kristoffer Solberg
  • Start date
K

Kjetil Kristoffer Solberg

If I add a ToolStripTextBox control to a ToolStrip. At run time if I want to
enter a text like "[something]", then to enter the "]" character I have to
press
the AltGr+9 Key(Keys.D9)(Norwegian keyboard). The problem is that
what happens is that the menu get's activated instead of the character
beeing
added to the textbox. I get a Keys.Menu.

Does anyone else get this problem?
What could be a workaround to this problem?


regards
Kjetil
 
K

Kjetil Kristoffer Solberg

The answer is to subscribe to the PreviewKeyDown event on the textbox and
set; e.IsInputKey = true; Now it works great. :) What a relief.
regards

Kjetil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top