Announcement

Collapse
No announcement yet.

Text Button Placement

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

  • Text Button Placement

    I am using the following code to try to place a text button 3 rows below the current bar:

    drawTextRelative(0, BelowBar3, " Buy Limit", Color.white, Color.black, Text.BUTTON | Text.CENTER, "Arial", 12, "BU"+nID);

    If the Text.BUTTON is changed to Text.PRESET, the text is drawn 3 rows beneath the current bar like it is supposed to.
    But as a button it is being placed down near the $0 on the yValue. Thanks, I am not sure what I am doing wrong.

  • #2
    charley
    Whenever you are using the AboveBar, BelowBar, etc location flags with the drawTextRelative/Absolute functions you need to use the Text.PRESET flag as indicated in this article in the EFS KnowledgeBase
    Alex


    Originally posted by charley View Post
    I am using the following code to try to place a text button 3 rows below the current bar:

    drawTextRelative(0, BelowBar3, " Buy Limit", Color.white, Color.black, Text.BUTTON | Text.CENTER, "Arial", 12, "BU"+nID);

    If the Text.BUTTON is changed to Text.PRESET, the text is drawn 3 rows beneath the current bar like it is supposed to.
    But as a button it is being placed down near the $0 on the yValue. Thanks, I am not sure what I am doing wrong.

    Comment


    • #3
      Can an event handler be assigned to a Text.PRESET object?

      Comment


      • #4
        charley
        I would suggest you read in its entirety the article I linked in my prior reply
        Alex


        Originally posted by charley View Post
        Can an event handler be assigned to a Text.PRESET object?

        Comment

        Working...
        X