Support Board
Date/Time: Wed, 27 Nov 2024 03:52:06 +0000
[Programming Help] - DRAWING_RECTANGLE_EXT_HIGHLIGHT or DRAWING_RECTANGLEHIGHLIGHT - Center Text Vertically
View Count: 292
[2023-09-27 05:06:34] |
User907967 - Posts: 54 |
Hi, Suppose I create a new drawing (DRAWING_RECTANGLE_EXT_HIGHLIGHT or DRAWING_RECTANGLEHIGHLIGHT), apply a text, click on its properties and select Center Text Vertically. In that case, that text will appear at half the vertical distance between its BeginValue and EndValue (i.e., its Y coordinates). Great. How do I get that text to appear in the same position if I use s_UseTool ? The below does not work. s_UseTool Tool;
Tool.Clear(); Tool.Text = Text; Tool.TextAlignment = DT_VCENTER | DT_CENTER; Tool.AddMethod = UTAM_ADD_OR_ADJUST; Tool.DrawingType = DRAWING_RECTANGLE_EXT_HIGHLIGHT; // Tool.DrawingType = DRAWING_RECTANGLEHIGHLIGHT; Tool.BeginValue = Value1; Tool.EndValue = Value2; sc.UseTool(Tool); Thank you. |
To post a message in this thread, you need to log in with your Sierra Chart account: