:
import wx
import wx.grid as gridlib
:
def GetAttr(self, row, col, kind):
attr = gridlib.GridCellAttr()
if col == 0:
attr.SetEditor( gridlib.GridCellChoiceEditor() )
return attr
: , , :
>>> import wx
>>> attr = wx.grid.GridCellAttr()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'grid'
, :
import wx.grid as gridlib
attr = gridlib.GridCellAttr()
... :
print attr
<wx.grid.GridCellAttr; proxy of <wx.grid.GridCellAttr; proxy of <Swig Object of type 'wxGridCellAttr *' at 0x97cb398> > >
: <wx.grid.GridCellAttr; proxy of <wx.grid.GridCellAttr>...>!
Obs2: ChoiceEditor 0, , :
attr.SetEditor( gridlib.GridCellChoiceEditor() )
yourGrid.SetColAttr(0, attr)
GetAttr ( , , ).