Page 1 of 1

How to add colur to columns in a grid in wxpython???

Posted: Mon Oct 17, 2016 5:07 am
by pikkip
I used wxPython to create a grid with two columns in a frame. I want to colour specific rows in columns based on some conditions. I am getting access only to very few colours like cyan,black,red and green. Can anyone suggest how to get more colours in to it??? :roll:

Re: How to add colur to columns in a grid in wxpython???

Posted: Mon Oct 17, 2016 5:31 am
by doublemax
In addition to the named colors you can also use any RGB values.

Code: Select all

win.SetBackgroundColour(wxColour(0,0,255))
win.SetBackgroundColour('BLUE')
win.SetBackgroundColour('#0000FF')
win.SetBackgroundColour((0,0,255))

Re: How to add colur to columns in a grid in wxpython???

Posted: Mon Oct 17, 2016 6:12 am
by pikkip
Thank you so much :D