Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MouseEventArgs

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

    MouseEventArgs

    Hello

    In NT 7 I was using the DoubleClick Event to get the double-click X and Y location with MouseEventArgs e parameter ( e.X and e.Y )

    Now with NT 8 the MouseEventArgs does not allow me to get the X and Y location anymore.
    What would be the solution to this ?

    Thanks

    #2
    Try using ChartControl.MouseDownPoint in the OnRender() when clicked.

    ref: http://ninjatrader.com/support/helpG...edownpoint.htm

    Comment


      #3
      Hello,

      Thank you Calonious for the information.

      That would be correct, on a side note, in an indicator or when this is loaded in a panel other than the panel 0, you would need to click in that panel for this to become active otherwise it may appear to not be working.

      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment


        #4
        Thank you Calonious

        Works pretty well but I am doing test without any connection and I draw a different text according to the click location. The click is updating when I click on the chart ( printing the location on the output window ) but the text stays the same. I know it could come from a different problem probably the RenderTarget.DrawTextLayout method ?

        Comment


          #5
          What is the text suppose to be displaying when you click?

          Can you give a snippet of your code?

          Comment


            #6
            I found my problem. It comes from another problem.

            If I drag the chart the text changes. Is there a way to refresh the chart as soon as I click on the mouse ?

            I think It was ChartControl.Refresh in NT 7

            The text displays a market profile data. The location is giving me the profile I need to display text.
            Last edited by blar58; 10-06-2015, 11:57 AM.

            Comment


              #7
              Yes there is.

              ForceRefresh()

              Ref: http://ninjatrader.com/support/helpG...rcerefresh.htm

              Comment


                #8
                It works like a charm !

                Thanks Calonious !

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by r68cervera, Today, 05:29 AM
                0 responses
                3 views
                0 likes
                Last Post r68cervera  
                Started by geddyisodin, Today, 05:20 AM
                0 responses
                6 views
                0 likes
                Last Post geddyisodin  
                Started by JonesJoker, 04-22-2024, 12:23 PM
                6 responses
                35 views
                0 likes
                Last Post JonesJoker  
                Started by GussJ, 03-04-2020, 03:11 PM
                12 responses
                3,241 views
                0 likes
                Last Post Leafcutter  
                Started by AveryFlynn, Today, 04:57 AM
                0 responses
                7 views
                0 likes
                Last Post AveryFlynn  
                Working...
                X