Login Page - Create Account

Support Board


Date/Time: Thu, 27 Feb 2025 19:04:50 +0000



[Programming Help] - How to control color of multiple subgraph with one input?

View Count: 360

[2021-07-13 10:36:05]
mbilyanov - Posts: 62
Hi,

I have multiple subgraphs, let's say:

SCSubgraphRef Subgraph_DeltaMaxLine = sc.Subgraph[0];
SCSubgraphRef Subgraph_DeltaMinLine = sc.Subgraph[1];
SCSubgraphRef Subgraph_DeltaLine = sc.Subgraph[2];
SCSubgraphRef Subgraph_SomeOtherLine = sc.Subgraph[3];

I would like to control all of these with one input:

SCInputRef MyLines = sc.Input[0];
MyLines.Name = "All My Lines Color";
MyLines.SetColor(47,47,47);

Then I can do:

Subgraph_DeltaMaxLine.PrimaryColor = MyLines.GetColor();
Subgraph_DeltaMinLine = MyLines.GetColor();
Subgraph_DeltaLine = MyLines.GetColor();
Subgraph_SomeOtherLine = MyLines.GetColor();

So this works, I believe, but I would like to hide the color inputs for the lines, because I'm setting those from one place, I don't want the user to have access to the color settings in the study settings window.

Is this possible?

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

Login

Login Page - Create Account