Changeset 858fabed in sasview


Ignore:
Timestamp:
Mar 20, 2009 6:31:29 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:
200a6c5
Parents:
20d30e9
Message:

add small function in utils

Location:
guiframe
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/dataFitting.py

    r12aa9b5 r858fabed  
    1212        plotData1D.__init__(self, x, y, dx, dy) 
    1313        self.smearer=None 
    14         if dxl !=None: 
    15             self.dxl = dxl 
    16         if dxw !=None: 
    17             self.dxw = dxw 
     14        
     15        self.dxl = dxl 
     16        self.dxw = dxw 
    1817  
    1918class Theory1D(plotTheory1D,DataInfo): 
     
    2120        plotTheory1D.__init__(self, x, y) 
    2221        self.smearer=None 
    23         if dxl !=None: 
    24             self.dxl = dxl 
    25         if dxw !=None: 
    26             self.dxw = dxw 
     22         
     23        self.dxl = dxl 
     24        self.dxw = dxw 
    2725  
  • guiframe/utils.py

    r4ba846b r858fabed  
    2020        output= "%-5.3g" % value 
    2121    return output.lstrip().rstrip() 
     22def check_value( item1, item2): 
     23    """ 
     24        Check 2 txtcrtl value  
     25        @param item1: txtcrtl containing the minimum value 
     26        @param item2: txtcrtl containing the maximum value 
     27    """ 
     28    mini = float(format_number(item1.GetValue())) 
     29    maxi = float(format_number(item2.GetValue())) 
     30    flag= True 
     31    if mini <  maxi:  
     32      item1.SetBackgroundColour(wx.WHITE) 
     33      item1.Refresh() 
     34    else: 
     35        flag = False 
     36        item1.SetBackgroundColour("pink") 
     37        item1.Refresh() 
     38       
     39    return flag 
     40    
     41     
     42     
    2243     
    2344class PanelMenu(wx.Menu): 
Note: See TracChangeset for help on using the changeset viewer.