當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.EVT_RIGHT_UP屬性代碼示例

本文整理匯總了Python中wx.EVT_RIGHT_UP屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.EVT_RIGHT_UP屬性的具體用法?Python wx.EVT_RIGHT_UP怎麽用?Python wx.EVT_RIGHT_UP使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在wx的用法示例。


在下文中一共展示了wx.EVT_RIGHT_UP屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: DoInsertPage

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_RIGHT_UP [as 別名]
def DoInsertPage(self, page, pos):
    if not isinstance(page, wx.Window):
      page=page(self)
      
    ctl=page.GetControl()
    if pos == None:
      self.AddPage(ctl, page.name)
      self.pages.append(page)
    else:
      self.InsertPage(pos, ctl, page.name)
      self.pages.insert(pos, page)
    if isinstance(ctl, wx.ListCtrl):
      ctl.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemDoubleClick)
      ctl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnItemRightClick)
      ctl.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick)
      if wx.Platform == "__WXMSW__":
        ctl.Bind(wx.EVT_RIGHT_UP, self.OnItemRightClick) 
開發者ID:andreas-p,項目名稱:admin4,代碼行數:19,代碼來源:notebook.py

示例2: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_RIGHT_UP [as 別名]
def __init__(self, parent):
        attribs = (glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 24)
        glcanvas.GLCanvas.__init__(self, parent, -1, attribList = attribs)    
        self.context = glcanvas.GLContext(self)
        
        self.parent = parent
        #Camera state variables
        self.size = self.GetClientSize()
        #self.camera = MouseSphericalCamera(self.size.x, self.size.y)
        self.camera = MousePolarCamera(self.size.width, self.size.height)
        
        #Main state variables
        self.MousePos = [0, 0]
        self.bbox = BBox3D()  
        
        #Face mesh variables and manipulation variables
        self.mesh = None
        self.meshCentroid = None
        self.displayMeshFaces = True
        self.displayMeshEdges = False
        self.displayMeshVertices = True
        self.displayVertexNormals = False
        self.displayFaceNormals = False
        self.useLighting = True
        self.useTexture = False
        
        self.GLinitialized = False
        #GL-related events
        wx.EVT_ERASE_BACKGROUND(self, self.processEraseBackgroundEvent)
        wx.EVT_SIZE(self, self.processSizeEvent)
        wx.EVT_PAINT(self, self.processPaintEvent)
        #Mouse Events
        wx.EVT_LEFT_DOWN(self, self.MouseDown)
        wx.EVT_LEFT_UP(self, self.MouseUp)
        wx.EVT_RIGHT_DOWN(self, self.MouseDown)
        wx.EVT_RIGHT_UP(self, self.MouseUp)
        wx.EVT_MIDDLE_DOWN(self, self.MouseDown)
        wx.EVT_MIDDLE_UP(self, self.MouseUp)
        wx.EVT_MOTION(self, self.MouseMotion) 
開發者ID:bmershon,項目名稱:laplacian-meshes,代碼行數:41,代碼來源:MeshCanvas.py

示例3: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_RIGHT_UP [as 別名]
def __init__(self, parent, size, data, *args, **kwargs):

        wx.ListBox.__init__(self, parent, size, **kwargs)

        if isinstance(data,(pd.RangeIndex,pd.Int64Index)):
            # RangeIndex is not supported by self._update_columns
            data = pd.Index([str(i) for i in data])
        self.data = data

        self.InsertItems(self.data, 0)

        self.Bind(wx.EVT_LISTBOX, self.on_selection_changed)

        self.Bind(wx.EVT_LEFT_DOWN, self.on_left_down)

        self.Bind(wx.EVT_RIGHT_DOWN, self.on_right_down)
        self.Bind(wx.EVT_RIGHT_UP, self.on_right_up)
        self.Bind(wx.EVT_MOTION, self.on_move)

        self.index_iter = range(len(self.data))

        self.selected_items = [True] * len(self.data)
        self.index_mapping = list(range(len(self.data)))

        self.drag_start_index = None

        self.update_selection()
        self.SetFocus() 
開發者ID:bluenote10,項目名稱:PandasDataFrameGUI,代碼行數:30,代碼來源:dfgui.py

示例4: CreateCtrl

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_RIGHT_UP [as 別名]
def CreateCtrl(self, ctrlType, init = True):
        szr = self.sizer
        szr.Clear(True)
        if ctrlType == 0:
            ctrl = eg.SpinNumCtrl(
                self,
                -1,
                self.initValue,
                **self.kwargs
            )
            ctrl.numCtrl.Bind(wx.EVT_RIGHT_UP, self.OnRclick)
            ctrl.numCtrl.SetToolTipString(eg.text.General.smartSpinTooltip)
            if init:
                ctrl.SetValue(self.value)
        else:
            ctrl = wx.TextCtrl(
                self,
                -1,
                str(self.value),
            )
            ctrl.Bind(wx.EVT_RIGHT_UP, self.OnRclick)
            ctrl.SetToolTipString(eg.text.General.smartSpinTooltip)
            if not init:
                ctrl.SetValue(("", "{eg.result}", "{eg.event.payload}", "")[ctrlType])
        szr.Add(ctrl, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
        szr.Layout()
        self.UpdateWidth(ctrl)
        return ctrl 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:30,代碼來源:SmartSpinNumCtrl.py

示例5: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_RIGHT_UP [as 別名]
def __init__(self, parent, id, figure):
        """
        Initialise a FigureWx instance.

        - Initialise the FigureCanvasBase and wxPanel parents.
        - Set event handlers for:
          EVT_SIZE  (Resize event)
          EVT_PAINT (Paint event)
        """

        FigureCanvasBase.__init__(self, figure)
        # Set preferred window size hint - helps the sizer (if one is
        # connected)
        l, b, w, h = figure.bbox.bounds
        w = math.ceil(w)
        h = math.ceil(h)

        wx.Panel.__init__(self, parent, id, size=wx.Size(w, h))

        # Create the drawing bitmap
        self.bitmap = wx.Bitmap(w, h)
        DEBUG_MSG("__init__() - bitmap w:%d h:%d" % (w, h), 2, self)
        # TODO: Add support for 'point' inspection and plot navigation.
        self._isDrawn = False

        self.Bind(wx.EVT_SIZE, self._onSize)
        self.Bind(wx.EVT_PAINT, self._onPaint)
        self.Bind(wx.EVT_KEY_DOWN, self._onKeyDown)
        self.Bind(wx.EVT_KEY_UP, self._onKeyUp)
        self.Bind(wx.EVT_RIGHT_DOWN, self._onRightButtonDown)
        self.Bind(wx.EVT_RIGHT_DCLICK, self._onRightButtonDClick)
        self.Bind(wx.EVT_RIGHT_UP, self._onRightButtonUp)
        self.Bind(wx.EVT_MOUSEWHEEL, self._onMouseWheel)
        self.Bind(wx.EVT_LEFT_DOWN, self._onLeftButtonDown)
        self.Bind(wx.EVT_LEFT_DCLICK, self._onLeftButtonDClick)
        self.Bind(wx.EVT_LEFT_UP, self._onLeftButtonUp)
        self.Bind(wx.EVT_MOTION, self._onMotion)
        self.Bind(wx.EVT_LEAVE_WINDOW, self._onLeave)
        self.Bind(wx.EVT_ENTER_WINDOW, self._onEnter)
        # Add middle button events
        self.Bind(wx.EVT_MIDDLE_DOWN, self._onMiddleButtonDown)
        self.Bind(wx.EVT_MIDDLE_DCLICK, self._onMiddleButtonDClick)
        self.Bind(wx.EVT_MIDDLE_UP, self._onMiddleButtonUp)

        self.Bind(wx.EVT_MOUSE_CAPTURE_CHANGED, self._onCaptureLost)
        self.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self._onCaptureLost)

        self.SetBackgroundStyle(wx.BG_STYLE_PAINT)  # Reduce flicker.
        self.SetBackgroundColour(wx.WHITE) 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:51,代碼來源:backend_wx.py


注:本文中的wx.EVT_RIGHT_UP屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。