PartitionEditor.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:GRIPy 作者: giruenf 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号