From: Alex T. <al...@tw...> - 2004-09-04 01:46:44
|
At 18:49 03/09/2004 -0400, Gregory Pi=F1ero wrote: >Thanks for the help on the dbBrowser sample. I see how to create widgets= =20 >at runtime now. I just have one more question for today. > >I am looking at the dbrowser2 sample now which on my computer is: >C:\Python23\Lib\site-packages\PythonCard\samples\dbBrowser\dbBrowser2.py >(note: there may be a bug in dbTable.py as I had to do a global replace of= =20 >"wxPyGridTableBase" to "PyGridTableBase" before it would run.) > >This program uses a grid to show a table. But I don't believe that a grid= =20 >is a pycard widget? The author seems to be using=20 >wx.grid.PyGridTableBase. My general questions are where can I find out=20 >what events can come from this grid and how do I bind actions to the=20 >events? Specifically all I want to do is launch a new window when the=20 >user clicks on a row in the grid. That's right - PythonCard doesn't (yet) have a grid widget, but this=20 example demonstrates the benefit of being able to "reach-through" to all=20 the wxPython widgets. You should be able to get an idea of the events etc. for any widget from=20 the wxWindows documentation - in this case wxGrid. Or - take a look at samples/simpleGrid - (included in the distribution, but= =20 not available through the sample launcher), which shows how to bind and=20 handle each event type for a grid. (Sorry - I haven't looked at it much myself yet, so I can't answer the=20 specific question). -- Alex. |