def GetAttr(self, row, col, kind):
#if _iswxphoenix:
attr = wx.grid.GridCellAttr().Clone()
#else:
# attr = wx.grid.GridCellAttr()
if col >= self.N_COLS:
attr.SetAlignment(wx.ALIGN_RIGHT, wx.ALIGN_CENTER)
elif col == 0:
attr.SetAlignment(wx.ALIGN_RIGHT, wx.ALIGN_CENTER)
elif col == 1:
part = self._OM.get(self.partmap[row])
attr.SetBackgroundColour(part.color)
attr.SetReadOnly(True)
elif col == 2:
attr.SetAlignment(wx.ALIGN_RIGHT, wx.ALIGN_CENTER)
elif col == 3:
attr.SetAlignment(wx.ALIGN_RIGHT, wx.ALIGN_CENTER)
return attr
评论列表
文章目录