I add QuantityUpDown on ChartWindow.MainMenu.
Up \ down arrows input work great.
But when I select the text element and try to edit it using keyboard, if I type any key NT takes over and thinks I'm trying to load a new data series or Instrument.
I found this thread, but can't imagine nothing working: http://ninjatrader.com/support/forum...QuantityUpDown
For example, this way not work properly:
private void On_Quantity_Selector_KeyDown(object sender, KeyEventArgs e)
{
e.Handled = true;
NinjaTrader.Gui.Tools.QuantityUpDown qs = sender as NinjaTrader.Gui.Tools.QuantityUpDown;
if( e.Key >= Key.D0 && e.Key <= Key.D9) qs.Content = (string)qs.Content + e.Key;
}
What is the right way?
May be, just need to invoke base event handler? But how to do it?
Comment