I ran across something with an index of Bevel Buttons where I cannot set the Pressed - Not Pressed value
Here is a link to a test app bevelbuttontest
This should demonstrate that from the arrayed control when you depress the bevel button an appropriate checkbox state changes
However clicking the checkbox does not change the appropriate bevel button array member
Is this a bug or did I not write the code to do this correctly?
It has to do with your coloring.
I commented out the entire coloring section and it works as expected.
Edit: Yeah I wouldn’t have done coloring that way. You’re re-coloring in MouseDown while using a checkbox would not fire the MouseDown on the schedule control set.
Interesting. Did not think about that.
Ok - how would you do the coloring?
I would color based on the .Value rather than the current color. That way you always have data to go from. If you’re depending on it already having a color - and for some unknown reason, ghosts in the machine and such - it’s not one of the two colors, you would never be able to get it back to one of the colors you wanted.
I might create a subclass that has a ValueChanged event that colors it (since it looks like there’s no Changed event right now), so whether it’s changed from a user click or by code, when it is changed you can color it. You might have to create a ChangeValue function/method in your subclass to accommodate. In the end you want it to re-color every time the value is changed. As you have it the .Value is changed but the color is not being redrawn when using checkboxes.