def on_cell_dlclick(self, event):
if event.GetCol() == 1:
row = event.GetRow()
table = self.tables[self.currentwellindex][self.currentpartitionindex]
color = table.get_color(row)
global COLOUR_DATA
COLOUR_DATA.SetColour(color)
dlg = wx.ColourDialog(self, COLOUR_DATA)
if dlg.ShowModal() == wx.ID_OK:
COLOUR_DATA = dlg.GetColourData()
color = COLOUR_DATA.GetColour().Get(True)
# TODO: alpha
table.set_color(row, color)
self.grid.ForceRefresh()
dlg.Destroy()
else:
event.Skip()
评论列表
文章目录