Support Board
Date/Time: Sun, 16 Mar 2025 17:39:28 +0000
Add API to GET the current state of an Advanced Control Bar Button
View Count: 552
[2022-08-23 19:33:02] |
User719512 - Posts: 303 |
Hello, Can you add an API to get the current state of an Advanced Control Bar Button? The issue is when wiring up a new button, the code has no idea if the button is already pressed or not, so it is unclear what to initialize internal variables to in all test cases. For example, if one were tying this to a study visibility and you are using 1 button for the state of 1 study visibility, you can just set to the current visibility of the study. If however, you already have the button tied to the visibility of study and want to duplicate and attach the same button to a 2nd study (controlling both), you would want to set the initial state of the newest instance to match the existing visibility state of the prior instance (to match the button state). One would need to know if the advanced control bar button is in the default/off or pushed/on state. Can you add an API like: sc.GetCustomStudyControlBarButtonEnable(int ControlBarButtonNum)
which returns the state of the button?
|
[2022-08-24 11:26:05] |
Sierra_Chart Engineering - Posts: 18797 |
There is already this function: sc.GetCustomStudyControlBarButtonEnableState Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2022-08-24 11:26:10
|
[2022-08-24 17:42:44] |
User719512 - Posts: 303 |
Hi, thanks! I missed that since I was looking in the Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events: Advanced Custom Study Buttons and Pointer Events page for relevant info. Maybe a small blurb on that page for the Get API would help folks. Appreciate the reply. |
[2022-08-30 15:34:34] |
Sierra_Chart Engineering - Posts: 18797 |
We will make sure it is added to the documentation.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: