a few questions about the grid control

Jeff,

···

-----Original Message-----
From: Jeff Peery [mailto:jeffpeery@seametrics.com]
Sent: Monday, August 13, 2007 11:08 AM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] RE: a few questions about the
grid control

Hi Tony, I'm trying to put a wx control in a grid cell as
well, but I'm not sure how to do that, I'm a bit of a newbie,
doe's Robin's book cover this with an example? Thanks.

Jeff

-----Original Message-----
From: Mike Driscoll [mailto:mdriscoll@co.marshall.ia.us]
Sent: Monday, August 13, 2007 6:48 AM
To: cappy2112@gmail.com; wxPython-users@lists.wxwidgets.org
Subject: [wxPython-users] RE: 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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

No, Robin's book doesn't cover adding wx controls to the cells of the
wx.grid...at least, I couldn't find anything. It's not on the wiki either.

Mike