Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Objects in back ground - NOT BY Z ORDER?

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

    Draw Objects in back ground - NOT BY Z ORDER?

    Hi everyone i have made simple indic that draws line on the chart, is there any way to disallow clicking (show anchor) of those lines?

    Code:
    Draw.Line(this, "MYLINE"+Times[0][1].Date, false, xStartTime, MYLINE_X, xEndTime, MYLINE_X, true, null);
    I was trying to find solution and the only ones that i have found is this:



    IsInHitTest should do the job or even OnMouseButtonDown but could you point me in right direction how can I apply it?

    But im little confused how can i use this feature to disallow for example object with name started with "MYLINE_" to be set as non clickable - not editable so basically it will not show anchors:
    Click image for larger version  Name:	image.png Views:	0 Size:	9.3 KB ID:	1314694
    I have seen chart panels that has been posted in user share app indicators that actually does "draw in background" feature and I was not able to find how its been made.

    If possible can i do the same with data plotted to be non selectable?

    Click image for larger version  Name:	image.png Views:	0 Size:	19.5 KB ID:	1314695

    Any suggestions kindly appreciated.
    Regards SuperUserek.
    Last edited by SuperUserek; 08-18-2024, 12:33 PM.

    #2
    Hello SuperUserek,

    Thank you for your post.

    IsLocked can be used to prevent the drawing object from being edited, however this won't prevent it from being selectable on the chart.



    The alternative would be to custom render the lines (as opposed to using Drawing Objects) when IsInHitTest is false.



    Please let us know if you have any further questions.

    Comment


      #3
      Hi Gaby, thanks for your suggestion i will look into it, as i dont really require lines to be drawn from time point on the chart, so basically i would rather do this as You suggested

      "The alternative would be to custom render the lines (as opposed to using Drawing Objects) when IsInHitTest is false."

      So from what i have understood i should use D2D factory and make "UI Rendering" of rectangle of lines instead.

      Click image for larger version

Name:	image.png
Views:	57
Size:	7.6 KB
ID:	1314831

      I will try find some working examples and apply it - i really love how customizable NT8 platform is. Thanks for your suggestions. If you have some examples or saw them already with user created indicator / scripts please point me to it.
      Regards Superuserek.

      Comment


        #4
        Below is the Help Guide page for Custom Rendering using SharpDX:



        SampleCustomRender is included in the platform as well, which demonstrates custom rendering various shapes.

        Please let us know if you have any further questions.

        Comment


          #5
          Lovely thanks for your help took me literally 2 min to modify my code to do what its meant to do with help of Yours.
          Kudos+.
          Much appreciated, Superuserek.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          576 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 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
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X