Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NumericTextBox Not Accepting Input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Hello alvik48,

    Unfortunately, adding a System.Windows.Controls.TextBox to a chart is not officially supported by NinjaTrader. This would require undocumented and unsupported code to acheive.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Hi colleagues.
      Here is the reason and the solution of the issue, described in the header of current thread:

      Test_NumBox = new NumericTextBox ()
      {
      Width = 50,
      ValueType = typeof (double),

      };


      You should just specify the type.
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #18
        Hello fx.practic,
        Thank you for your recommendation. Unfortunately this does not resolve the problem of "NumericTextBox Not Accepting Input" within the NTWindow environment.
        Using the xaml listing from Ninjascript reference and addition of your code shown below, the NumericTextBox only shows a cursor and still would not accept any character from the keyboard. It is almost like the characters from the keyboard were intercepted by another process and not reaching the NumericTextBox.

        Do you have a sample NTwindow addon (or code snippets) with a NumericTextBox that is functional?

        <Grid>
        <!-- Define a NumericTextBox -->
        <t:NumericTextBox x:Name="daysBackSelector" Text ="5" ValueType="{x:Type system:Int32}" Width="50" Grid.Column="2">
        <!-- Set the margins for the box -->
        <t:NumericTextBox.Margin>
        <Thickness Left="{StaticResource MarginButtonLeft}" Top="{StaticResource PaddingColumn}" Right="{StaticResource MarginBase}"/>
        </t:NumericTextBox.Margin>
        </t:NumericTextBox>
        </Grid>

        private NumericTextBox daysBack = new NumericTextBox ()
        {
        Width = 50,
        ValueType = typeof (double),
        };

        private DependencyObject LoadXAML()
        {
        // Find days back selector
        daysBack = LogicalTreeHelper.FindLogicalNode(pag eContent, "daysBackSelector") as NumericTextBox;
        }

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        563 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        329 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X