Support Board
Date/Time: Sun, 25 Oct 2026 03:42:31 +0000
Post From: v2960 Cannot set Horizontal Ray TextColor from s_UseTool
| [2026-09-28 15:50:18] |
| User719512 - Posts: 513 |
|
Appreciate the follow up. This full sample code will demonstrate the issue. If you only draw the Tool a single time (controlled by a persistent), the text is white. If drawn a second time, it will turn from white to green. SCSFExport scsf_DrawingTest(SCStudyInterfaceRef sc) { int& r_MaxDrawCount = sc.GetPersistentIntFast(0); if (sc.SetDefaults) { return; } if (sc.Index == 0) { r_MaxDrawCount = 0; } // set this to 2, text will be green. set to 1 and it is white. constexpr int kMaxCount = 1; if (r_MaxDrawCount < kMaxCount) { ++r_MaxDrawCount; const int beginIndex = sc.ArraySize - 10; s_UseTool newRay; newRay.ChartNumber = sc.ChartNumber; newRay.DrawingType = DRAWING_HORIZONTAL_RAY; newRay.LineNumber = 1; newRay.AddMethod = UTAM_ADD_OR_ADJUST; newRay.Region = 0; newRay.BeginIndex = beginIndex; newRay.BeginValue = sc.Close[beginIndex]; newRay.Color = RGB(255, 0, 0); newRay.LineWidth = 1; newRay.Text = "TextColor probe"; newRay.TextColor = RGB(0, 255, 0); newRay.FontSize = 12; newRay.TransparentLabelBackground = 1; sc.UseTool(newRay); } } |
