Changeset e051c8d in sasview


Ignore:
Timestamp:
Dec 18, 2009 11:08:25 PM (15 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
eb1b89f
Parents:
85b3971
Message:

guiframe: remove badly design util method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/utils.py

    ra208464 re051c8d  
    3636    return flag 
    3737 
    38  
    39 def check_value(item1, item2): 
    40     """ 
    41         Check 2 txtcrtl item values if they are in order 
    42         @param item1: txtcrtl containing value1 
    43         @param item2: txtcrtl containing value2 
    44         @return flag=True when value1<value2  
    45         Note: item1 backgroundcolour="white" when value1<value2 otherwise "pink" 
    46     """ 
    47     flag= True 
    48     flag_item1 = check_float(item1) 
    49     flag_item2 = check_float(item2) 
    50     if flag_item1 == False or flag_item2 == False: 
    51         flag = False 
    52     else: 
    53         value_item1 = float(item1.GetValue()) 
    54         value_item2 = float(item2.GetValue()) 
    55         if value_item1 <  value_item2:  
    56           #Make sure to set both colours white.   
    57           item1.SetBackgroundColour(wx.WHITE) 
    58           item1.Refresh() 
    59           item2.SetBackgroundColour(wx.WHITE) 
    60           item2.Refresh() 
    61         else: 
    62             flag = False 
    63             item1.SetBackgroundColour("pink") 
    64             item1.Refresh()       
    65     return flag 
    66      
    6738     
    6839class PanelMenu(wx.Menu): 
Note: See TracChangeset for help on using the changeset viewer.