Python wx.NullCursor() Examples
The following are 10
code examples of wx.NullCursor().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: edit_base.py From wxGlade with MIT License | 6 votes |
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
Example #2
Source File: RubberBand.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
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()
Example #3
Source File: Viewer.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
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
Example #4
Source File: tydesk.py From tydesk with GNU General Public License v3.0 | 5 votes |
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()
Example #5
Source File: xrced.py From admin4 with Apache License 2.0 | 5 votes |
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)
Example #6
Source File: panel.py From wxGlade with MIT License | 5 votes |
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
Example #7
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
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()
Example #8
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def ShowCursor(self, event): self.staticBitmap.SetCursor(wx.NullCursor) self.timer.cancel() self.timer = Timer(2.0, self.HideCursor) self.timer.start() event.Skip()
Example #9
Source File: Viewer.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
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)]
Example #10
Source File: DebugVariableGraphicViewer.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
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()