对一个表格里的某个cell进行双击,然后获得单击的这一行的第一个值,并且打印出来,具体方法是:
'''python
self.jira_project_grid.Bind(gridlib.EVT_GRID_CELL_LEFT_DCLICK,self.enter_defect_manage)
def enter_defect_manage(self, event):
row =self.frame.grid_1.GetSelectedRows()[0]
print(self.frame.grid_1.GetCellValue(row, 1))
添加图片文字按钮,这个比较坑,几乎在stack overflow。github上都搜不到这个结局方案。做出来的样式如图
例如这样的,把一个要有图片,又要有文字的按钮加入sizer里,需要用到GenBitmapTextButton()
具体用法:
'''python
attachment_button = GenBitmapTextButton(self.frame.panel_2, wx.ID_ANY, bitmap=wx.Bitmap(
"resource/image/icon/picture.png", wx.BITMAP_TYPE_ANY),
label=item["file_name"],
name="attachment_button_" +str(index))
self.frame.sizer_9.Insert(index, attachment_button, 0)
self.frame.sizer_9.Layout()
'''