python类PyCommandEvent()的实例源码

mainframe.py 文件源码 项目:pyDataView 作者: edwardsmith999 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def fdir_dialogue(self, event):

        fdir = ""  # Use  folder as a flag
        currentdir = self.dirchooser.textctrl.GetValue()
        dlg = wx.DirDialog(self, defaultPath = currentdir)
        if dlg.ShowModal() == wx.ID_OK:
            fdir = dlg.GetPath() + "/"
            dlg.SetPath(fdir)
        dlg.Destroy()  # best to do this sooner than later

        if fdir:
            self.dirchooser.textctrl.SetValue(fdir)
            event = wx.PyCommandEvent(wx.EVT_TEXT_ENTER.typeId, 
                                      self.dirchooser.textctrl.GetId())
            self.GetEventHandler().ProcessEvent(event)
            self.fdir = fdir
recipe-286201.py 文件源码 项目:code 作者: ActiveState 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def __init__(self, func, onSuccess, onFailure, *params, **kwparams):
        wx.PyCommandEvent.__init__(self, wxEVT_RESPONSE, 1)
        self.func = func
        self.onSuccess = onSuccess
        self.onFailure = onFailure
        self.params = params
        self.kwparams = kwparams
dfgui.py 文件源码 项目:PandasDataFrameGUI 作者: bluenote10 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def swap(self, i, j):
        self.index_mapping[i], self.index_mapping[j] = self.index_mapping[j], self.index_mapping[i]
        self.SetString(i, self.data[self.index_mapping[i]])
        self.SetString(j, self.data[self.index_mapping[j]])
        self.selected_items[i], self.selected_items[j] = self.selected_items[j], self.selected_items[i]
        # self.update_selection()
        # print("Updated mapping:", self.index_mapping)
        new_event = wx.PyCommandEvent(wx.EVT_LISTBOX.typeId, self.GetId())
        self.GetEventHandler().ProcessEvent(new_event)
FancyTabNotebook.py 文件源码 项目:fmc-dialer 作者: sguron 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def __init__(self, eventType, eventId=1, sel=-1, oldsel=-1):
        """
        Default class constructor.

        :param `eventType`: the event type;
        :param `eventId`: the event identifier;
        :param `sel`: the current selection;
        :param `oldsel`: the old selection.
        """

        wx.PyCommandEvent.__init__(self, eventType, eventId)
        self._eventType = eventType
        self._sel = sel
        self._oldsel = oldsel
        self._allowed = True
piemenu.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self, choice, id=wx.ID_ANY):
        wx.PyCommandEvent.__init__(self, id=id,
            eventType=wxEVT_PIEMENU_SELECT)
        self.choice = choice
canvas_sample.py 文件源码 项目:dxf2gcode 作者: cnc-club 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __init__(self,message):
        wx.PyCommandEvent.__init__(self, myEVT_PRINT, wx.ID_ANY)
        self._message = message
MainFrame.py 文件源码 项目:PancakeViewer 作者: forensicmatt 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def __init__(self, etype, eid, value=None):
        """Creates the event object"""
        wx.PyCommandEvent.__init__(self, etype, eid)
        self._value = value

        print 'EVIDENCELOADED EVENT'
visuals.py 文件源码 项目:pyDataView 作者: edwardsmith999 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def post_string_event(self, eventtype, eventval, panel):
        """
            Triggers an event 
        """
        event = wx.PyCommandEvent(eventtype.typeId, panel.GetId())
        event.SetString(str(eventval))
        wx.PostEvent(self.GetEventHandler(),event)
sliders.py 文件源码 项目:pyDataView 作者: edwardsmith999 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def post_slide_event(self,eventval):
        """
            Updated positions triggers an
            event to let the parent know scroll 
            position has been changed 
        """
        event = wx.PyCommandEvent(wx.EVT_COMMAND_SCROLL_CHANGED.typeId, self.GetId())
        event.SetInt(eventval)
        wx.PostEvent(self.GetEventHandler(),event)
wxTerminal.py 文件源码 项目:Jackal_Velodyne_Duke 作者: MengGuo 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __init__(self, windowID, data):
        wx.PyCommandEvent.__init__(self, self.eventType, windowID)
        self.data = data
wxTerminal.py 文件源码 项目:btc-fpga-miner 作者: marsohod4you 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, windowID, data):
        wx.PyCommandEvent.__init__(self, self.eventType, windowID)
        self.data = data
trackssplitter.py 文件源码 项目:GRIPy 作者: giruenf 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, type=wx.wxEVT_NULL, splitter=None):
        wx.PyCommandEvent.__init__(self, type)
        if splitter:
            self.SetEventObject(splitter)
            self.SetId(splitter.GetId())
        self.sashIdx = -1
        self.sashPos = -1
        self.isAllowed = True


问题


面经


文章

微信
公众号

扫码关注公众号