Login Page - Create Account

Support Board


Date/Time: Wed, 12 Feb 2025 18:29:25 +0000



Post From: Stationary Text from ACSIL

[2017-11-06 17:25:51]
cross - Posts: 70
The idea is to put on a label and hide/show when the trade management is off/on. Stationary text seems to be the right tool.

Besides using a persistent integer for the LineNumber.. I retrieve the text label by:
sc.GetUserDrawingByLineNumber(sc.ChartNumber, TextDrawingLineNumber, TextDrawing)

If the result is false I do what you sent too (UTAM_ADD_ONLY_IF_NEW).

However, if the label aready exists and I just flip the HideDrawing as you see below and vice versa..
    if (TextDrawing.HideDrawing == 0)
    {
      TextDrawing.HideDrawing = 1;
      sc.UseTool(TextDrawing);
      TextDrawingLineNumber = TextDrawing.LineNumber;
}

.. the text begins drifting.

May the GetUserDrawingByLineNumber(...) not retrieve all the label members correctly and so the hiding/showing sc.UseTool() resets some fields? Or do I need to re-set some members to properly display the label again after changing the HideDrawing?

Thanks