Changeset 37f487e in sasview for guiframe


Ignore:
Timestamp:
Apr 13, 2009 3:41:56 PM (16 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:
b64fa56
Parents:
309ccaf
Message:

hightlight textcrtl for slicerpanel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/slicerpanel.py

    r12aa9b5 r37f487e  
    8585 
    8686                    self.Bind(wx.EVT_TEXT_ENTER, self.onTextEnter) 
     87                    ctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    8788                    ctl.Bind(wx.EVT_KILL_FOCUS, self.onTextEnter) 
     89                     
    8890                    self.parameters.append([item, ctl]) 
    8991                    self.bck.Add(ctl, (n-1,1), flag=wx.TOP|wx.BOTTOM, border = 0) 
     
    101103        self.parent.GetSizer().Layout() 
    102104         
    103          
     105    def onSetFocus(self, evt): 
     106        """ 
     107            Hightlight the textcrtl 
     108        """ 
     109        # Get a handle to the TextCtrl 
     110        widget = evt.GetEventObject() 
     111        # Select the whole control, after this event resolves 
     112        wx.CallAfter(widget.SetSelection, -1,-1) 
     113        return 
     114     
     115     
    104116    def onParamChange(self, evt): 
    105117        """ 
Note: See TracChangeset for help on using the changeset viewer.