Page 1 of 1

Button Background color (GTT2.5)

Posted: Fri Jun 17, 2022 11:02 am
by shpolina
How can I programmatically set the background color for button 2.5?

The output generated by GTT contains methods for setting the button foreground:
gtt_set_buttin_foreground_r()
gtt_set_buttin_foreground_g()
gtt_set_buttin_foreground_b()

but doesn't generate the same for the background.
Any suggestions?

Re: Button Background color (GTT2.5)

Posted: Mon Jun 20, 2022 3:45 pm
by Raquel
Hello Polina,

Thank you for posting on the forum.

As per our last chat conversation, I have been corrected:
For the rectangle, triangle and circle buttons, what is referred to as 'foreground' is actually the text color.
There is no changeable background color property, as the background is actually an image that gets defined when you create one in the Designer.

Also as per last chat, I know your goal is to dynamically change the button visually to indicate the state.
All of the buttons do change visually when they change state.
Perhaps what you might want to try to use is the Rectangle Toggle Text button, you can set the state of a Toggle Button (but again the colors are again predefined).

Thank you,
Raquel