ChartWindow.MainMenu.Add([I]control[/I])
I've tried to use the example in this thread: http://ninjatrader.com/support/forum...PreviewKeyDown
Unfortunately it's not working. When I implement the PreviewKeyDown event I get a CS0118 error.
The bind event and event code are:
private void TxtBxPositionSize_PreviewKeyDown(object sender, KeyEventArgs e)
{
// this is pretty dumb, but should get you started
// might want to validate this by using SHIFT or something
// so Overlay Instrument Selector isn't unusable...
TextBox textBoxSender = (TextBox)sender;
textBoxSender.Text += e.Key.ToString();
// handle the keydown event for the text box
e.Handled = true;
Print("input keys: " + textBoxSender.Text);
}
Any help is much appreciated.
Thanks
Comment