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?

    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.

        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 XXtrader, Yesterday, 11:30 PM
          2 responses
          11 views
          0 likes
          Last Post XXtrader  
          Started by Waxavi, Today, 02:10 AM
          0 responses
          6 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by TradeForge, Today, 02:09 AM
          0 responses
          11 views
          0 likes
          Last Post TradeForge  
          Started by Waxavi, Today, 02:00 AM
          0 responses
          2 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by elirion, Today, 01:36 AM
          0 responses
          7 views
          0 likes
          Last Post elirion
          by elirion
           
          Working...
          X