Disabling wxGrid Columns

'allo. Took a while looking over documentation, list archives, and
the web and I can't find an easy answer. Does anyone know of a way to disable
only certain columns of a wxGrid to the same effect as calling .Enable(False)
on the whole grid does?
        I can set the attributes to a column to be read-only and change
the color (anyone know the exact shade used for disabled columns?) but the
color change doesn't seem to effect columns whos colors have been specially
set.
        Thanks very much.

James Fraumeni
james.fraumeni@activeprime.com

IIRC, there is a priority of how rwo/col/cell attributes are merged, so if the cell has some attributes set they will be used in place of any attributes set for the col.

The colours for disabled grids are set like this:
dc.SetTextBackground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
dc.SetTextForeground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_GRAYTEXT));

···

james.fraumeni@activeprime.com wrote:

        'allo. Took a while looking over documentation, list archives, and
the web and I can't find an easy answer. Does anyone know of a way to disable
only certain columns of a wxGrid to the same effect as calling .Enable(False)
on the whole grid does?
        I can set the attributes to a column to be read-only and change
the color (anyone know the exact shade used for disabled columns?) but the
color change doesn't seem to effect columns whos colors have been specially
set.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!