Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Button Background Colour
-
Hi,
Quick one I hope.Is it possible to change the background colour of a button from within code, i.e. I want to make the colour dynamic so I can make it all black or white like a crossword. Or should I utilise the image to match my needs?
Thanks for your time.
Regards
Gary -
button_name.background_color = 'lightgray'
-
Thanks for that, I did search the class library for something like this but couldn’t/can’t find it. Am I looking in the wring place?
-
@GaryGadget Note that
ui.Button
is a subclass ofui.View
, so thebackground_color
property is inherited from that. -
@GaryGadget
Note that when begin to type, the marvelous automatic generation of available methods:
-
Don’t know how I missed that. Thanks for your help.
-