Support Board
Date/Time: Mon, 23 Jun 2025 06:26:02 +0000
Post From: SetCustomStudyControlBarButtonEnable()
[2022-03-04 20:53:27] |
Richard Chinn - Posts: 35 |
You are correct, this part of the code you show works perfectly as does mine which is only slightly different from yours. I see that I did not do a good job explaining what is happening. I initialize all my buttons on start up to the ENABLED state. When the buttons are shown, they are the right color, text, and hover text but the button is not shown pushed in. It is only when the button is initialized in the ENABLED state and BEFORE the button has been pushed that it does not display correctly. I can push it and it will display and operate perfectly in both states with my code and the code you showed me. I don't test for button pushes until later in my program so initialization and testing for the button push are separated. Hope this is clear now, I'm sorry I didn't do a better job explaining it the first time. Thanks, I love this program!!!! if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Test Function 7"; sc.AutoLoop = 0; sc.UpdateAlways = 1; return; } static int State = 1; // My Code to initialize buttons in the ENABLED state sc.SetCustomStudyControlBarButtonEnable(1, State); sc.SetCustomStudyControlBarButtonColor(1, COLOR_Red); sc.SetCustomStudyControlBarButtonText(1, "CS 1"); sc.SetCustomStudyControlBarButtonHoverText(1, "Enabled"]); |