[wxpython-users] Possible to draw an outline around wx.grid.Grid cell or row?

Raffaello Barella barbarossa.platz at gmail.com
Tue Mar 25 09:04:24 PDT 2008


With a custom renderer, in the function Draw() there is a lot you can do in
the matter of backgrounds and outlines and fonts. If you don't want to
squander your RAM by setting  a specific renderer for each cell, pass to the
renderer a list of the cells you want to be redrawn.

2008/3/25, Tim van der Leeuw <tnleeuw at gmail.com>:
>
> Hi,
>
> I'm wondering if it's possible to draw a coloured outline around a
> particular cell or row in a wxGrid, and remove the outline at will again.
> I wish to highlight rows (or cells, if rows is too hard) in a wxGrid which
> match to a particular item selected elsewhere, and move the highlight to
> another row when the selection changes in the other window.
>
> For this, I don't want to change the wxGrid selection.
>
> I've been thinking about setting a GridCellAttr on the row which I wish to
> be highlighted, with a suitable background-colour for the row. Then I can
> set another GridCellAttr with white background colour to remove the
> highlight-colour.
>
> So I'm not certain if setting a row-attribute will work for me (I can find
> out with some experiments), but also, I would prefer to have an outline
> instead of a background-colour.
>
> Does anyone have suggestions or hints?
>
> Thanks in advance,
>
> --Tim
>
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200803=
25/e28dde44/attachment.htm


More information about the wxpython-users mailing list