Login Page - Create Account

Support Board


Date/Time: Thu, 26 Dec 2024 13:35:32 +0000



Post From: Deleting all user drawn text drawings upon removing study

[2015-12-03 06:55:20]
KhaosTrader - Posts: 128
I did some reading, and found some instructions on modifying non user drawings, I set study to make all drawings to nonuserdrawings, and modified my function to this:


bool ChangeTextDrawingColor(SCStudyGraphRef& sc, s_UseTool& Tool_TextWriter, int NumberText, bool HideAddonTextLabels)


{
Tool_TextWriter.AddMethod = UTAM_ADD_OR_ADJUST;
//sc.GetUserDrawingByLineNumber(sc.ChartNumber, NumberText, Tool_TextWriter, DRAWING_TEXT, 0);

Tool_TextWriter.LineNumber = NumberText;
//Tool_TextWriter.TransparentLabelBackground = 1;
if (HideAddonTextLabels == true)
{
  //Tool_TextWriter.Text = "";

}

Tool_TextWriter.TextColor = RGB(88,88,88);
sc.UseTool(Tool_TextWriter);

return true;
}


The text drawings disappeared rather than have their color change. So it didn't work, and I am not sure why.