How to add colur to columns in a grid in wxpython??? Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
User avatar
pikkip
Knows some wx things
Knows some wx things
Posts: 37
Joined: Mon Sep 26, 2016 6:08 am

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

Post by pikkip » Mon Oct 17, 2016 5:07 am

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:

User avatar
doublemax
Moderator
Moderator
Posts: 13990
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

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

Post by doublemax » Mon Oct 17, 2016 5:31 am

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))
Use the source, Luke!

User avatar
pikkip
Knows some wx things
Knows some wx things
Posts: 37
Joined: Mon Sep 26, 2016 6:08 am

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

Post by pikkip » Mon Oct 17, 2016 6:12 am

Thank you so much :D

Post Reply