wx.grid display icon in a column header cell

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

wx.grid display icon in a column header cell

Eric
I'd like to display an icon in one cell of the column headers.  The intent is to show the next column of data cells that will next be sent to a machine.

I have searched back through the forum for "grid" and also for "grid icon" and found some old code (2003) that displays a triangle in a column header cell (to indicate that the column is sorted) but its obviously for a very old version of both the wxPython library and Python itself, and so for me will take a lot of effort to research the changes and make it work (if in fact I am capable of achieving that).

Please - is there a code sample available for Python 3 and the current wxPython library (4.0.0b) that will accomplish this requirement?

Eric
Reply | Threaded
Open this post in threaded view
|

Re: wx.grid display icon in a column header cell

Robin Dunn
Take a look at the GridLabelRenderer sample in the demo. It shows how you can draw the labels yourself. It just gives them a background color, but you can use the same technique to draw a bitmap or icon.


On Thu, Aug 24, 2017 at 5:11 PM, Eric <[hidden email]> wrote:
I'd like to display an icon in one cell of the column headers.  The intent is
to show the next column of data cells that will next be sent to a machine.

I have searched back through the forum for "grid" and also for "grid icon"
and found some old code (2003) that displays a triangle in a column header
cell (to indicate that the column is sorted) but its obviously for a very
old version of both the wxPython library and Python itself, and so for me
will take a lot of effort to research the changes and make it work (if in
fact I am capable of achieving that).

Please - is there a code sample available for Python 3 and the current
wxPython library (4.0.0b) that will accomplish this requirement?

Eric



--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/wx-grid-display-icon-in-a-column-header-cell-tp5727515.html
Sent from the wxPython-users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--
Robin Dunn
Software Craftsman
http://wxPython.org

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.