a few questions about the grid control

Hi Tony,

···

-----Original Message-----
From: Tony Cappellini [mailto:cappy2112@gmail.com]
Sent: Sunday, August 12, 2007 1:05 AM
To: wxPython-users@lists.wxwidgets.org
Subject: a few questions about the grid control

I'm going through Robin's book as well as the SimpleGridDemo.

I don't actually want to use much of the built-in cell
editing functionality, I'm hoping to be able to put small
jpgs (thumbnails in a few of the cells, but have event
handlers be called when the user clicks on an images.

The "Custom Table with non-string data" looks like it may be
the closest example of putting an object into the cells, but
I'm nit sure how to go about making an event handler get
called if the user clicks on an image within the cell.

Would someone mind posting a reply if this is possible or
not, or point me to a piece of code which shows how to
respond to a user clicking on an image in a cell?

thanks

If you look at the wxPython demo, it shows how to catch all events related
to the grid. Looks like they use EVT_GRID_SELECT_CELL to tell when a cell
is selected. You should be able to use it as well and just use an if
statement to tell if you're in the right column or not.

Mike