Changeset 4e1c362 in sasview for invariantview/perspectives/invariant/invariant_widgets.py
- Timestamp:
- Jul 16, 2010 9:24:21 AM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b5a21aa
- Parents:
- 855546d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant_widgets.py
rd7a39e5 r4e1c362 15 15 import wx 16 16 import os 17 from invariant_state import InvariantState as IState 18 import copy 17 19 18 20 class InvTextCtrl(wx.TextCtrl): … … 22 24 """ 23 25 def __init__(self, *args, **kwds): 24 25 26 wx.TextCtrl.__init__(self, *args, **kwds) 26 27 27 ## Set to True when the mouse is clicked while the whole string is selected 28 full_selection = False28 self.full_selection = False 29 29 ## Call back for EVT_SET_FOCUS events 30 30 _on_set_focus_callback = None 31 31 32 # Bind appropriate events 32 33 self.Bind(wx.EVT_LEFT_UP, self._highlight_text) 33 34 self.Bind(wx.EVT_SET_FOCUS, self._on_set_focus) 34 35 35 36 def _on_set_focus(self, event): 36 37 """ … … 39 40 40 41 :param event: mouse event 41 42 42 """ 43 43 event.Skip() … … 49 49 50 50 :param event: mouse event 51 52 51 """ 53 52 # Make sure the mouse event is available to other listeners … … 63 62 if start==end: 64 63 control.SetSelection(-1,-1) 64 65 65 66 66 67 class OutputTextCtrl(wx.TextCtrl): 67 68 """ … … 78 79 # The event will be skipped once the call-back 79 80 # is called. 81 80 82 self.Bind(wx.EVT_MOUSE_EVENTS, self._click) 83 81 84 82 85 def _click(self, event): … … 86 89 """ 87 90 pass 91 92 93 88 94
Note: See TracChangeset
for help on using the changeset viewer.