本文主要是介绍wxpython treebook 实现在双击事件 double clicking,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
实现代码,
import wxclass Frame(wx.Frame):def __init__(self, prnt):wx.Frame.__init__(self, id=wx.ID_ANY, name='Frame', parent=prnt,pos=wx.Point(280, 247), size=wx.Size(900, 500),style=wx.DEFAULT_FRAME_STYLE, title='Example')self.SetClientSize(wx.Size(900, 500))self.SetMinSize(wx.Size(600, 400))self.Bind(wx.EVT_KEY_UP, self.OnFrameKeyUp)self.treebook = wx.Treebook(self, wx.ID_ANY,style=wx.BK_DEFAULT)self.treebook.Bind(wx.EVT_TREEBOOK_NODE_EXPANDED,self.OnTreebook)self.treebook.Bind(wx.EVT_TREEBOOK_NODE_COLLAPSED,self.OnTreebook)tc = self.treebook.GetTreeCtrl()tc.SetWindowStyle(tc.GetWindowStyle()|wx.TR_EDIT_LABELS)tc.Bind(wx.EVT_LEFT_DCLICK, self.
这篇关于wxpython treebook 实现在双击事件 double clicking的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!