But I could not find a list of _all colours_ available for
SetCellTextColour().
2. How can I change grid's column heading font attributes ?
Namely, how can I change the font to non-bold, or to make it
smaller ?
According to the wxPython book, you should be able to use SetLabelFont(font) to change the font of row and column labels. I'm not sure if this affect both columns AND rows or not. You might also try SetColLabelSize(height)
1. Where can I find a list of colours available for _text_ inside
grid cells ?
Googling, I found that (e.g.) the following works:
self.grid.SetCellTextColour(row,col,wx.RED)
But I could not find a list of _all colours_ available for
SetCellTextColour().
$ pydoc wx.Colour
Help on class Colour in wx:
wx.Colour = class Colour(wx._core.Object)
> A colour is an object representing a combination of Red, Green, and
> Blue (RGB) intensity values, and is used to determine drawing colours,
> window colours, etc. Valid RGB values are in the range 0 to 255.
>
> In wxPython there are typemaps that will automatically convert from a
> colour name, from a '#RRGGBB' colour hex value string, or from a 3 or 4
> integer tuple to a wx.Colour object when calling C++ methods that
> expect a wxColour. This means that the following are all
> equivallent::
>
> win.SetBackgroundColour(wxColour(0,0,255))
> win.SetBackgroundColour('BLUE')
> win.SetBackgroundColour('#0000FF')
> win.SetBackgroundColour((0,0,255))
>
> Additional colour names and their coresponding values can be added
> using `wx.ColourDatabase`. Various system colours (as set in the
> user's system preferences) can be retrieved with
> `wx.SystemSettings.GetColour`.
>
2. How can I change grid's column heading font attributes ?
Namely, how can I change the font to non-bold, or to make it smaller ?
SetLabelFont
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Saturday, November 01, 2008 03:38
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] Grid: which colours are available ; how to change column header font ?
Barak, Ron wrote:
Hi Guys,
Two questions on wx.grid.Grid:
1. Where can I find a list of colours available for _text_ inside
grid cells ?
Googling, I found that (e.g.) the following works:
self.grid.SetCellTextColour(row,col,wx.RED)
But I could not find a list of _all colours_ available for
SetCellTextColour().
$ pydoc wx.Colour
Help on class Colour in wx:
wx.Colour = class Colour(wx._core.Object)
> A colour is an object representing a combination of Red, Green, and
> Blue (RGB) intensity values, and is used to determine drawing colours,
> window colours, etc. Valid RGB values are in the range 0 to 255.
>
> In wxPython there are typemaps that will automatically convert from a
> colour name, from a '#RRGGBB' colour hex value string, or from a 3 or 4
> integer tuple to a wx.Colour object when calling C++ methods that
> expect a wxColour. This means that the following are all
> equivallent::
>
> win.SetBackgroundColour(wxColour(0,0,255))
> win.SetBackgroundColour('BLUE')
> win.SetBackgroundColour('#0000FF')
> win.SetBackgroundColour((0,0,255))
>
> Additional colour names and their coresponding values can be added
> using `wx.ColourDatabase`. Various system colours (as set in the
> user's system preferences) can be retrieved with
> `wx.SystemSettings.GetColour`.
>
2. How can I change grid's column heading font attributes ?
Namely, how can I change the font to non-bold, or to make it smaller ?
SetLabelFont
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!