Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.TextFixed - different colours on different lines

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

    Draw.TextFixed - different colours on different lines

    Hello,

    I have some code which prints 4 lines of values to my chart and each line may be a different colour depending on the values. I currently use Draw.Text to achieve this, but I would like the text to remain in a fixed position. Is there a way to use Draw.TextFixed to achieve this?

    Thank you.

    #2
    Originally posted by GeorgeW View Post
    Hello,

    I have some code which prints 4 lines of values to my chart and each line may be a different colour depending on the values. I currently use Draw.Text to achieve this, but I would like the text to remain in a fixed position. Is there a way to use Draw.TextFixed to achieve this?

    Thank you.
    No. If you wan to do that, you will have to write your on information panel using the window properties for locations. Look in the code for SampleCustomRender for ideas.

    Comment


      #3
      Thanks for your response, Koganam.

      I have been able to resolve the matter by starting a new Draw.TextFixed piece of code for each of the lines that I want on the chart, and then doubling the line spacing to the next line at the start of the text field for each subsequent line apart from the first. So the 2nd line text field starts with "\n" + "\n" +, the 3rd with "\n" + "\n" + "\n" + "\n" + and so on. Anything to avoid trying to get my head around the OnRender method this morning.

      Comment


        #4
        Originally posted by GeorgeW View Post
        Thanks for your response, Koganam.

        I have been able to resolve the matter by starting a new Draw.TextFixed piece of code for each of the lines that I want on the chart, and then doubling the line spacing to the next line at the start of the text field for each subsequent line apart from the first. So the 2nd line text field starts with "\n" + "\n" +, the 3rd with "\n" + "\n" + "\n" + "\n" + and so on. Anything to avoid trying to get my head around the OnRender method this morning.
        Well, yes, one can do that if the text background is transparent or empty. I kind of thought that you were coloring the background. I should have asked before writing. I apologize.

        Comment

        Latest Posts

        Collapse

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