Changeset 1328e03 in sasview for sansview


Ignore:
Timestamp:
Apr 1, 2009 11:02:56 AM (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

Location:
sansview/perspectives/fitting
Files:
7 deleted
5 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      
  • sansview/perspectives/fitting/fitpage.py

    r59a7f2d r1328e03  
    252252                     
    253253                    ctl1.SetValue(str (format_number(value))) 
    254                     ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     254                    ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    255255                    ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
    256256                    self.sizer4_4.Add(ctl1, (iy,ix),(1,1),wx.EXPAND) 
     
    277277                         
    278278                        Tctl.SetValue(str (format_number(value))) 
    279                         Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     279                        Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    280280                        Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
    281281                        self.sizer4_4.Add(Tctl, (iy,ix),(1,1), 
     
    291291                                            style=wx.TE_PROCESS_ENTER) 
    292292                        Tctl.SetValue(str (format_number(value))) 
    293                         Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     293                        Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    294294                        Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
    295295                        self.sizer4_4.Add(Tctl, (iy,ix),(1,1), 
  • sansview/perspectives/fitting/fitpanel.py

    r9853ad0 r1328e03  
    3333        #Creating the default page --welcomed page 
    3434        self.about_page=None 
    35         from sans.guiframe.welcome_panel import PanelAbout 
     35        from welcome_panel import PanelAbout 
    3636        self.about_page = PanelAbout(self, -1) 
    3737        self.AddPage(self.about_page,"welcome!") 
  • sansview/perspectives/fitting/modelpage.py

    r59a7f2d r1328e03  
    8686        self.npts.SetValue(format_number(self.num_points)) 
    8787        self.npts.SetToolTipString("Number of point to plot.") 
    88         self.npts.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     88        self.npts.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    8989        self.npts.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 
    9090         
     
    169169                     
    170170                    ctl1.SetValue(str (format_number(value))) 
    171                     ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     171                    ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    172172                    ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
    173173                    self.sizer4_4.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 
     
    183183                         
    184184                        Tctl1.SetValue(str (format_number(value))) 
    185                         Tctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     185                        Tctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    186186                        Tctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
    187187                        self.sizer4_4.Add(Tctl1, (iy,ix),(1,1), 
     
    198198                                            style=wx.TE_PROCESS_ENTER) 
    199199                        Tctl2.SetValue(str (format_number(value))) 
    200                         Tctl2.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     200                        Tctl2.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    201201                        Tctl2.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
    202202                        self.sizer4_4.Add(Tctl2, (iy,ix),(1,1), 
     
    383383                 
    384384                ctl1.SetValue(str (format_number(value))) 
    385                 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 
     385                ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 
    386386                ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 
     387                 
    387388                sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 
    388389         
  • sansview/perspectives/fitting/welcome_panel.py

    r823905f r1328e03  
    8181        self.static_line_1 = wx.StaticLine(self, -1) 
    8282        self.label_acknowledgement = wx.StaticText(self, -1, config._acknowledgement) 
    83        
    84  
    85         
    86  
     83         
     84        self.hyperlink_license = wx.StaticText(self, -1, "Comments? Bugs? Requests?") 
     85        self.hyperlink_paper = wx.lib.hyperlink.HyperLinkCtrl(self, -1, 
     86                                         "Send us a ticket",URL=config._license) 
    8787        # end wxGlade 
    88      
     88         
    8989#       
    9090        # randomly shuffle authors' names 
     
    114114        sizer_main = wx.BoxSizer(wx.VERTICAL) 
    115115        sizer_header = wx.BoxSizer(wx.HORIZONTAL) 
    116         sizer_build = wx.GridBagSizer(0,0) 
     116        sizer_build = wx.BoxSizer(wx.VERTICAL) 
    117117        
    118118        
    119119        sizer_header.Add(self.bitmap_logo, 0, wx.EXPAND|wx.LEFT, 5) 
    120120         
    121         ix = 0 
    122         iy = 0 
    123         sizer_build.Add((20,20),(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
    124         iy +=1 
    125         sizer_build.Add(self.label_acknowledgement,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
    126         iy +=1 
    127         sizer_build.Add(self.label_title ,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
    128         ix = 0 
    129         iy +=1 
    130         sizer_build.Add(self.label_build,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
    131         ix = 0 
    132         iy +=1 
    133         sizer_build.Add( self.label_copyright,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
     121         
     122        sizer_build.Add(self.label_acknowledgement,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
     123        sizer_build.Add((5,5)) 
     124        sizer_build.Add(self.label_title ,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
     125        sizer_build.Add(self.label_build,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
     126        sizer_build.Add( self.label_copyright,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
     127        sizer_build.Add((5,5)) 
     128        sizer_build.Add( self.hyperlink_license,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
     129        sizer_build.Add( self.hyperlink_paper,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
    134130         
    135131        sizer_main.Add(sizer_header, 0, wx.TOP|wx.EXPAND, 3) 
     
    147143 
    148144# end of class DialogAbout 
     145class HelpWindow(wx.Frame): 
     146    def __init__(self, parent, id, title): 
     147        wx.Frame.__init__(self, parent, id, title, size=(570, 400)) 
     148        
     149         
     150        self.page = PanelAbout(self) 
     151         
     152        self.Centre() 
     153        self.Show(True) 
    149154 
     155 
     156    
     157if __name__=="__main__": 
     158    app = wx.App() 
     159    HelpWindow(None, -1, 'HelpWindow') 
     160    app.MainLoop() 
     161         
Note: See TracChangeset for help on using the changeset viewer.