I would like an example of properly defining and implementing a wx.Grid.
The new API doc and the wxWidgets book helped me create what I thought would
work, but I'm still getting an error: "AttributeError: 'module' object has no
attribute 'Grid'."
So, an example would help greatly. I find nothing on the wiki and Google
doesn't turn up an example.
Thanks,
Rich
···
--
Richard B. Shepard, Ph.D. | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
I would like an example of properly defining and implementing a wx.Grid.
The new API doc and the wxWidgets book helped me create what I thought would
work, but I'm still getting an error: "AttributeError: 'module' object has no
attribute 'Grid'."
Quick thought: make sure the module that you're thinking of is the same as the module that the message is referring to. Sometimes, "print >>sys.stderror, dir(object)" helps.
Happy hunting,
Don Dwiggins
Advanced Publishing Technology
I would like an example of properly defining and implementing a wx.Grid.
The new API doc and the wxWidgets book helped me create what I thought would
work, but I'm still getting an error: "AttributeError: 'module' object has no
attribute 'Grid'."
So, an example would help greatly. I find nothing on the wiki and Google
doesn't turn up an example.
Thanks,
Rich
It's not obvious in the demo, but you have to import wx.grid (lower case) to get at the grid classes. I usually do:
import wx.grid as grid
class MyGrid(grid.Grid):
def __init__(self,parent,....
....
grid.Grid.__init__(self,parent,...
Thank you. It is the correct one. I didn't print the entire string of
messages, but they refer to the one module that tries to call wx.Grid, and to
the specific line, too.
Rich
···
On Mon, 5 Dec 2005, Don Dwiggins wrote:
Quick thought: make sure the module that you're thinking of is the same as
the module that the message is referring to. Sometimes, "print
sys.stderror, dir(object)" helps.
--
Richard B. Shepard, Ph.D. | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863