Ignore:
Timestamp:
Apr 10, 2017 5:14:22 AM (8 years ago)
Author:
Tim Snow <tim.snow@…>
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
2d220dd
Parents:
bd8411d5
Message:

Minor enhancement

The text label next to the x-ray input box now changes with respect to
the option picked from the dropdown list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/sld_panel.py

    rbd8411d5 rfe09e9b  
    114114        self.neutron_wavelength_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1)) 
    115115        self.neutron_wavelength_ctl.SetValue(str(self.neutron_wavelength)) 
    116         xray_source_input_txt = wx.StaticText(self, -1, 'X-ray wavelength') 
     116        self.xray_source_input_txt = wx.StaticText(self, -1, 'X-ray wavelength') 
    117117        self.xray_source_input_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1)) 
    118118        self.xray_source_input_ctl.SetValue(str(self.xray_source_input)) 
     
    153153        iy += 1 
    154154        ix = 0 
    155         sizer_input.Add(xray_source_input_txt, (iy, ix), (1, 1), 
     155        sizer_input.Add(self.xray_source_input_txt, (iy, ix), (1, 1), 
    156156                             wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
    157157        ix += 1 
     
    322322        item = event.GetEventObject() 
    323323        self.xray_source = item.GetValue().strip() 
     324 
     325        if self.xray_source == "[A]": 
     326            self.xray_source_input_txt.SetLabel("X-ray wavelength") 
     327        elif self.xray_source == "[keV]": 
     328            self.xray_source_input_txt.SetLabel("X-ray energy") 
     329        elif self.xray_source == "Element": 
     330            self.xray_source_input_txt.SetLabel("X-ray source") 
    324331 
    325332    def on_help(self, event): 
Note: See TracChangeset for help on using the changeset viewer.