Login Page - Create Account

Support Board


Date/Time: Sun, 29 Dec 2024 15:15:39 +0000



ACSIL: How to keep the text above a horizontal line regardless of scale range changes?

View Count: 710

[2016-05-16 10:21:38]
User129630 - Posts: 22
I want to keep (draw) the text slightly above a horizontal line regardless of the scale range changes. However, when I do the scale range changes, the text seems to float up or down and doesn't stay above the horizontal line anymore. It is probably incorrect to use the value with (y value of the horizontal line - font size). I look at all the documentation and couldn't find an alternative for this. The following is my code. Please advise.

  Tool.BeginValue = -8; // assuming the horizontal line is at 0.
// Unfortunately, the text doesn't stay above the horizontal line after scale range changes
  Tool.Color = color;
  Tool.FontSize = 8;
  Tool.FontBold = true;
  Tool.AddMethod = UTAM_ADD_OR_ADJUST;
  Tool.ReverseTextColor = 0;
  Tool.TextAlignment = DT_CENTER;
  Tool.Text.Format(" %.2f", value);
  return(sc.UseTool(Tool));

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account