I am trying to get my buttons to have a certain color background when they are pressed and I know I could create a custom property and then script that property to turn on and off with press and unpress and then run the style customizer based off that property BUT, there should be an easy way to do this without scripting like that, the button is already turning grey when pressed, why can I not change that color?
For Vision this is defined in the Look and Feel JAVA Swing properties. It may be possible to change that on a vision client startup, but more than likely this is hard coded and cannot be changed outside of the style customizer like you mentioned.
What Ignition version is this? The way buttons appear and can be styled in Vision changed a lot in 8.1.8; it should be a lot closer to ‘desired’ appearance.
Paul can you point to a document on how this can be done? That sounds really interesting.
Oh, I see. I didn’t read the question closely enough. @brandon1, you’re correct, this is basically just a Java Swing limitation. Swing, by design, ‘delegates’ everything about how buttons are actually rendered to the ‘look and feel’. The look and feel can choose to obey (or disregard entirely) whatever properties you have set on any given component.
From 8.0.0 to 8.1.7, buttons had even less control over their appearance than they currently do, but in 8.1.8 we integrated a new version of our look and feel that follows the supplied properties more accurately. However, there are still fundamental limitations to Swing that we just can’t work around; there isn’t an easy way to add ‘meta’ styles as there is in CSS (and therefore Perspective).