videoPathText = "this is test txt !"
selectPathButton = wx.Button(controlView,label="选择视频文件",pos=(375,5))
self.frame.Bind(wx.EVT_BUTTON, lambda evt,textCtr=videoPathText : self.selectVideoFile(evt,textCtr), selectPathButton)


def selectVideoFile(self,evt,textCtr):
    print("textCtr")

使用 lambda表达式,用法如上

 

相关文章:

  • 2021-08-28
  • 2021-06-13
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
猜你喜欢
  • 2021-08-25
  • 2021-11-20
  • 2021-06-14
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案