Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

font size

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

    font size

    Is it possible to create a font with a variable for the size parameter?

    private Font f = new Font("Arial",fontsize);

    I tried this but it caused an error

    I would like to use the drawtext function with a variable font size:

    DrawText(string tag, bool autoScale, string text, int barsAgo, double y, double yPixelOffset, Color textColor, Font font, StringAlignment alignment, Color outlineColor, Color backColor, int opacity)


    #2
    Did you check already into this thread? http://www.ninjatrader-support2.com/...ead.php?t=7274
    BertrandNinjaTrader Customer Service

    Comment


      #3
      font

      Thanks for the link.

      However that still doesnt tell me how I can change the font size dynamically. In the example shown a font is created using a fixed size of 10 points, I would like this to be variable.

      private Font fv = new Font("Arial", 10, GraphicsUnit.Point);

      So the fixed value of 10 above should be a variable.

      Comment


        #4
        I think this should be doable with a user defined input as a parameter - http://www.ninjatrader-support2.com/...ead.php?t=5782
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by frslvr, 04-11-2024, 07:26 AM
        8 responses
        111 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        10 responses
        44 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by rocketman7, Today, 09:41 AM
        3 responses
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by traderqz, Today, 09:44 AM
        2 responses
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rocketman7, Today, 02:12 AM
        7 responses
        31 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X