Ignore:
Timestamp:
Apr 1, 2009 1:02:56 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
9d4e502
Parents:
db39b2a
Message:

removing all codes.and add highlight for textcrtl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/basepage.py

    r59a7f2d r1328e03  
    354354            out.close() 
    355355 
    356      
     356      
     357    def onSetFocus(self, evt): 
     358        # Get a handle to the TextCtrl 
     359        widget = evt.GetEventObject() 
     360        # Select the whole control, after this event resolves 
     361        wx.CallAfter(widget.SetSelection, -1, -1) 
     362        return 
    357363     
    358364    def read_file(self, path): 
     
    754760                value= float(item[2].GetValue()) 
    755761                # If the value of the parameter has changed, 
    756                 # update the model and set the is_modified flag 
     762                # +update the model and set the is_modified flag 
    757763                if value != self.model.getParam(name): 
    758764                    self.model.setParam(name,value) 
    759765                    is_modified = True     
    760766            except: 
    761                 raise 
    762                 #msg= "Model Drawing  Error:wrong value entered : %s"% sys.exc_value 
    763                 #wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 
    764                 #return  
     767                msg= "Model Drawing  Error:wrong value entered : %s"% sys.exc_value 
     768                wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 
     769                return  
    765770         
    766771        return is_modified  
     
    797802            self.SetScrollbars(20,20,200,100) 
    798803             
    799          
     804    
    800805         
    801806    def _layout_sizer_noDipers(self): 
     
    916921        self.qmin.SetValue(format_number(self.qmin_x)) 
    917922        self.qmin.SetToolTipString("Minimun value of Q in linear scale.") 
    918         self.qmin.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     923        self.qmin.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    919924        self.qmin.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 
    920925      
     
    922927        self.qmax.SetValue(format_number(self.qmax_x)) 
    923928        self.qmax.SetToolTipString("Maximum value of Q in linear scale.") 
    924         self.qmax.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     929        self.qmax.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    925930        self.qmax.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 
    926931      
Note: See TracChangeset for help on using the changeset viewer.