Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does DrawText auto-trim a string?

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

    Does DrawText auto-trim a string?

    I have a line DrawText("Test"+ CurrentBar, "Hello" + " ", 0, Close[0], Color.Black, textFont, StringAlignment.Far, Color.Transparent,Color.White,10); The added padding of spaces to shift the text slightly to the left is eliminated when displayed. I tried to use .PadRight(8, ' ') and it seems to ignore it also. Is there a way to get the text shifted slightly over to the left with spaces?
    Last edited by marketmasher; 04-14-2009, 07:45 PM.

    #2
    marketmasher,

    White spaces are ignored. Try using a non-whitespace character.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Some examples of non-whitespace characters?
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        .,;'[]\/12345asdf. Anything that does not produce a blank space. If you want a blank space unfortunately that is beyond the level of support we can offer. You will have to dive into C# to see if there are any string manipulations you can use to mimic the effect.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Unfortunately your non-whitespace characters also will print that character, thus defeating the purpose.
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            That's precisely the point. This is not supported and if you want to move it you will need to look around for C# resources.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            161 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            308 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X