• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Immediately Start Drawing Tool in Active/Editing Mode

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

    Immediately Start Drawing Tool in Active/Editing Mode

    I am trying to get a drawing tool to be immediately active and editing without clicking the mouse first (active as soon as it is started from the drawing tool menu option). This effectively allows the user to preview where the first point/portion of the drawing is to allow best placement.

    When the drawing starts, I can see that State is Active, DrawingState is in Building state, and the anchors are in editing mode, but there are no call backs to OnMouseMove or OnRender until after the first mouse click.

    I tried setting the InitialMouseDownAnchor, but no luck.

    How can I kick this drawing into a true active state/building state without an initial mouse click?

    #2
    Hello aslane,

    Thank you for your post.

    May I ask for further details on what you intend to have happen when the user first selects the object?
    Is it to start drawing at a specific point?
    Have you looked into the Drawing Tools code for setting DrawingStates?
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      May I ask for further details on what you intend to have happen when the user first selects the object?
      Is it to start drawing at a specific point?
      When the tool is selected from the menu, the current mouse point becomes the initial anchor. For example, say you are going to draw a Horizontal Line. Once started from the toolbar button, the mouse determines the initial anchor (via the OnMouseMove calls) and the OnRender code can draw an initial horiz line that moves up and down with the mouse. Then when the user is happy with the position, the mouse click places the drawing.

      Have you looked into the Drawing Tools code for setting DrawingStates?
      Not sure what you are getting at here. As I mentioned, when started, my drawing goes to a State == Active, DrawingState == Building, and Anchors.IsEditing == true. However, there are no initial OnMouseMove/OnRender events until the mouse is clicked.

      I am not sure what is blocking the initial OnMouseMove calls in this initial state?

      Comment


        #4
        Hello aslane,

        Thank you for your patience.

        I looked into this further on my end to see if I could create this. I ran into a wall when it came to having the object visually appear directly after selecting the object. The means to do this would be to have the Start Anchor appear and sync to the mouse point. However, there is no means to force that Start Anchor without the first mouse click event upon the Chart Render Target.

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Ok, thanks for trying. I'll simulate by leaving the first anchor in editing mode after the first click. Not ideal, but close.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by aligator, Today, 10:11 PM
          0 responses
          1 view
          0 likes
          Last Post aligator  
          Started by psquare, Today, 03:11 PM
          4 responses
          18 views
          0 likes
          Last Post psquare
          by psquare
           
          Started by ballboy11, Today, 03:20 PM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by tonynt, Today, 02:18 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_JoshG  
          Started by denalek2419, Today, 01:46 PM
          3 responses
          12 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Working...
          X