From: <gre...@co...> - 2004-09-04 03:24:21
|
Thanks for the advice, Alex, the simplegrid program is very helpful. There may be a bug in the simplegrid program, is it better to report it here, or somehow get a sourceforge login deal and go that route? The bug is in the file: C:\Python23\Lib\site-packages\PythonCard\samples\simpleGrid\simpleGrid.py The program does not work properly unless I do a global replace of event.skip() to event.Skip(). Just lower case s to upper case. I'm not sure why that would be? Here's the version info: PythonCard version: 0.8 wxPython version: 2.5.2.7 Python version: 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] Platform: win32 -Greg Alex Tweedly wrote: > At 18:49 03/09/2004 -0400, Gregory Piñero wrote: > >> Thanks for the help on the dbBrowser sample. I see how to create >> widgets 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 "wxPyGridTableBase" to "PyGridTableBase" before it would run.) >> >> This program uses a grid to show a table. But I don't believe that a >> grid is a pycard widget? The author seems to be using >> wx.grid.PyGridTableBase. My general questions are where can I find >> out what events can come from this grid and how do I bind actions to >> the events? Specifically all I want to do is launch a new window when >> the user clicks on a row in the grid. > > > That's right - PythonCard doesn't (yet) have a grid widget, but this > example demonstrates the benefit of being able to "reach-through" to all > the wxPython widgets. > > You should be able to get an idea of the events etc. for any widget from > the wxWindows documentation - in this case wxGrid. > > Or - take a look at samples/simpleGrid - (included in the distribution, > but not available through the sample launcher), which shows how to bind > and handle each event type for a grid. > > (Sorry - I haven't looked at it much myself yet, so I can't answer the > specific question). > -- Alex. > |