当前位置: 首页>>代码示例>>Python>>正文


Python wx.NullCursor方法代码示例

本文整理汇总了Python中wx.NullCursor方法的典型用法代码示例。如果您正苦于以下问题:Python wx.NullCursor方法的具体用法?Python wx.NullCursor怎么用?Python wx.NullCursor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wx的用法示例。


在下文中一共展示了wx.NullCursor方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: on_drop_widget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def on_drop_widget(self, event, reset=None):
        """replaces self with a widget in self.sizer. This method is called
        to add every non-toplevel widget or sizer, and in turn calls the
        appropriate builder function (found in the ``common.widgets'' dict)"""
        if not common.adding_widget:  # widget focused/selecte
            misc.set_focused_widget(self)
            if self.widget:
                self.widget.Refresh()
                self.widget.SetFocus()
            return
        if common.adding_sizer and self.parent.CHILDREN != 1 and not self.IS_SLOT:
            return
        if self.widget:
            self.widget.SetCursor(wx.NullCursor)
        common.adding_window = event and event.GetEventObject().GetTopLevelParent() or None
        # call the appropriate builder
        new_widget = common.widgets[common.widget_to_add](self.parent, self.index)
        if new_widget is None: return
        misc.rebuild_tree(new_widget)
        if reset is False: return
        if event is None or not misc.event_modifier_copy(event):
            common.adding_widget = common.adding_sizer = False
            common.widget_to_add = None 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:25,代码来源:edit_base.py

示例2: OnLeftUp

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def OnLeftUp(self, event, dc, scaling):
        """
        Called when mouse is release from Viewer. Erase the current edited
        rubberband bounding box
        @param event: Mouse event
        @param dc: Device Context of Viewer
        @param scaling: PLCOpen scaling applied on Viewer
        """
        # Change viewer mouse cursor to default
        self.DrawingSurface.SetCursor(wx.NullCursor)

        # Save the last edited bounding box
        self.LastBBox = self.CurrentBBox
        self.CurrentBBox = None

        self.Redraw() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:18,代码来源:RubberBand.py

示例3: SetMode

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def SetMode(self, mode):
        if self.Mode != mode or mode == MODE_SELECTION:
            if self.Mode == MODE_MOTION:
                wx.CallAfter(self.Editor.SetCursor, wx.NullCursor)
            self.Mode = mode
            self.SavedMode = False
        else:
            self.SavedMode = True
        # Reset selection
        if self.Mode != MODE_SELECTION and self.SelectedElement:
            self.SelectedElement.SetSelected(False)
            self.SelectedElement = None
        if self.Mode == MODE_MOTION:
            wx.CallAfter(self.Editor.SetCursor, wx.StockCursor(wx.CURSOR_HAND))
            self.SavedMode = True

    # Return current drawing mode 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:19,代码来源:Viewer.py

示例4: OnMouseEvent

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def OnMouseEvent(self, e):
    if e.Moving():
      self.SetCursor(wx.Cursor(wx.CURSOR_HAND))
      self.SetFont(self.font1)

    elif e.LeftUp():
      OpenWith(self.openWith, self.url)
    else:
      self.SetCursor(wx.NullCursor)
      self.SetFont(self.font2)
    e.Skip() 
开发者ID:tydesk,项目名称:tydesk,代码行数:13,代码来源:tydesk.py

示例5: SetHandler

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def SetHandler(self, w, h=None):
        if h:
            w.SetEventHandler(h)
            w.SetCursor(wx.CROSS_CURSOR)
        else:
            w.SetEventHandler(w)
            w.SetCursor(wx.NullCursor)
        for ch in w.GetChildren():
            self.SetHandler(ch, h) 
开发者ID:andreas-p,项目名称:admin4,代码行数:11,代码来源:xrced.py

示例6: drop_sizer

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def drop_sizer(self, event=None, reset=None):
        if self.children or not common.adding_sizer:
            self.on_set_focus(event)  # default behaviour: call show_properties
            return
        if self.widget: self.widget.SetCursor(wx.NullCursor)
        new_widget = common.widgets[common.widget_to_add](self, None)
        if new_widget is None: return
        misc.rebuild_tree(new_widget)
        if reset is False: return
        if event is None or not misc.event_modifier_copy(event):
            common.adding_widget = common.adding_sizer = False
            common.widget_to_add = None 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:14,代码来源:panel.py

示例7: ShowCursor

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def ShowCursor(self, event):
        self.SetCursor(wx.NullCursor)
        if self.timer:
            self.timer.cancel()
        self.timer = Timer(2.0, self.HideCursor)
        self.timer.start()
        event.Skip() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:9,代码来源:__init__.py

示例8: ShowCursor

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def ShowCursor(self, event):
        self.staticBitmap.SetCursor(wx.NullCursor)
        self.timer.cancel()
        self.timer = Timer(2.0, self.HideCursor)
        self.timer.start()
        event.Skip() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:8,代码来源:__init__.py

示例9: ResetCursors

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def ResetCursors():
    global CURSORS
    if CURSORS is None:
        CURSORS = [wx.NullCursor,
                   wx.StockCursor(wx.CURSOR_HAND),
                   wx.StockCursor(wx.CURSOR_SIZENWSE),
                   wx.StockCursor(wx.CURSOR_SIZENESW),
                   wx.StockCursor(wx.CURSOR_SIZEWE),
                   wx.StockCursor(wx.CURSOR_SIZENS)] 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:11,代码来源:Viewer.py

示例10: OnLeave

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def OnLeave(self, event):
        """
        Function called when mouse leave Viewer
        @param event: wx.MouseEvent
        """
        # If Viewer is not resizing, reset resize highlight
        if self.CanvasStartSize is None:
            self.SetHighlight(HIGHLIGHT_NONE)
            self.SetCursor(wx.NullCursor)
            DebugVariableViewer.OnLeave(self, event)
        else:
            event.Skip() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:14,代码来源:DebugVariableGraphicViewer.py


注:本文中的wx.NullCursor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。