Changeset b7e0fff in sasview


Ignore:
Timestamp:
Mar 30, 2010 5:07:42 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:
9bd6c13c
Parents:
328c328
Message:

enable copy and paste of slit length textcrtl

Location:
calculatorview/perspectives/calculator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/perspectives/calculator/calculator_widgets.py

    r378d2eb rb7e0fff  
    5555                    control.SetSelection(-1,-1) 
    5656 
    57 class OutputTextCtrl(wx.TextCtrl): 
     57     
     58class InterActiveOutputTextCtrl(wx.TextCtrl): 
    5859    """ 
    5960        Text control used to display outputs. 
     
    6364    def __init__(self, *args, **kwds): 
    6465        wx.TextCtrl.__init__(self, *args, **kwds) 
     66        self.SetEditable(False) 
     67        self.SetBackgroundColour(self.GetParent().GetBackgroundColour()) 
     68         
     69class OutputTextCtrl(InterActiveOutputTextCtrl): 
     70    """ 
     71        Text control used to display outputs. 
     72        No editing allowed. The background is  
     73        grayed out. User can't select text. 
     74    """ 
     75    def __init__(self, *args, **kwds): 
     76        InterActiveOutputTextCtrl.__init__(self, *args, **kwds) 
    6577        self.SetEditable(False) 
    6678        self.SetBackgroundColour(self.GetParent().GetBackgroundColour()) 
     
    7789        """  
    7890        pass 
    79   
     91 
     92       
  • calculatorview/perspectives/calculator/slit_length_calculator_panel.py

    r328c328 rb7e0fff  
    1616from sans.guicomm.events import StatusEvent   
    1717from sans.calculator.slit_length_calculator import SlitlengthCalculator   
    18 from calculator_widgets import OutputTextCtrl 
     18from calculator_widgets import OutputTextCtrl, InterActiveOutputTextCtrl 
    1919 
    2020_BOX_WIDTH = 76 
     
    2828    PANEL_HEIGHT = 230 
    2929    FONT_VARIANT = 1 
    30      
    31  
     30  
    3231class SlitLengthCalculatorPanel(wx.Panel): 
    3332    """ 
     
    8887        """ 
    8988        slit_size_txt = wx.StaticText(self, -1, 'Full Slit Size: ') 
    90         self.slit_size_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
     89        self.slit_size_tcl = InterActiveOutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    9190        slit_size_hint = " Estimated full slit size" 
    9291        self.slit_size_tcl.SetToolTipString(slit_size_hint) 
Note: See TracChangeset for help on using the changeset viewer.