- Timestamp:
- Apr 21, 2009 6:43:00 PM (16 years ago)
- 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:
- c09ac449
- Parents:
- 5fc8e22
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
rc477b31 r6fdfc8f 902 902 sizer.Add(self.cb1,(iy, ix),(1,1),\ 903 903 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 5) 904 ix += 1905 self.text2_4 = wx.StaticText(self, -1, '[Units]')906 sizer.Add(self.text2_4,(iy, ix),(1,1),\907 wx.EXPAND|wx.ADJUST_MINSIZE, 0)908 #self.text2_4.Hide()909 904 ix +=1 910 905 self.text2_2 = wx.StaticText(self, -1, 'Values') … … 926 921 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 927 922 self.text2_max.Hide() 923 ix += 1 924 self.text2_4 = wx.StaticText(self, -1, '[Units]') 925 sizer.Add(self.text2_4,(iy, ix),(1,1),\ 926 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 927 self.text2_4.Hide() 928 928 if self.engine_type=="park": 929 929 self.text2_max.Show(True) … … 940 940 sizer.Add( cb,( iy, ix),(1,1), 941 941 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 5) 942 ix +=1943 # Units944 try:945 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)946 except:947 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)948 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)949 942 950 943 ## add parameter value … … 999 992 ctl3.Show(True) 1000 993 ctl4.Show(True) 994 ix +=1 995 # Units 996 try: 997 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT) 998 except: 999 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 1000 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1001 1001 1002 1002 ##[cb state, name, value, "+/-", error of fit, min, max , units] … … 1020 1020 sizer.Add( cb,( iy, ix),(1,1), 1021 1021 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 5) 1022 ix +=11023 # Units1024 try:1025 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)1026 except:1027 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)1028 if self.data.__class__.__name__ =="Data2D":1029 units.Enable()1030 else:1031 units.Disable()1032 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)1033 1022 1034 1023 ## add parameter value … … 1096 1085 ctl3.Show(True) 1097 1086 ctl4.Show(True) 1087 ix +=1 1088 # Units 1089 try: 1090 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT) 1091 except: 1092 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 1093 if self.data.__class__.__name__ =="Data2D": 1094 units.Enable() 1095 else: 1096 units.Disable() 1097 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1098 1098 1099 1099 -
sansview/perspectives/fitting/modelpage.py
rc477b31 r6fdfc8f 462 462 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 463 463 ix +=1 464 self.text2_2 = wx.StaticText(self, -1, 'Values') 465 sizer.Add(self.text2_2,(iy, ix),(1,1),\ 466 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 467 ix +=1 464 468 self.text2_4 = wx.StaticText(self, -1, '[Units]') 465 469 sizer.Add(self.text2_4,(iy, ix),(1,1),\ 466 470 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 467 #self.text2_4.Hide() 468 ix +=1 469 self.text2_2 = wx.StaticText(self, -1, 'Values') 470 sizer.Add(self.text2_2,(iy, ix),(1,1),\ 471 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 471 self.text2_4.Hide() 472 472 473 473 for item in keys: … … 478 478 sizer.Add( name,( iy, ix),(1,1), 479 479 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 480 481 ix += 1 482 value= self.model.getParam(item) 483 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), 484 style=wx.TE_PROCESS_ENTER) 485 486 ctl1.SetValue(str (format_number(value))) 487 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 488 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 489 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 490 491 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 480 492 ix +=1 481 493 # Units … … 485 497 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 486 498 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 487 488 ix += 1489 value= self.model.getParam(item)490 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),491 style=wx.TE_PROCESS_ENTER)492 493 ctl1.SetValue(str (format_number(value)))494 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)495 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)496 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)497 498 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)499 499 ##[cb state, name, value, "+/-", error of fit, min, max , units] 500 500 self.parameters.append([None,item, ctl1, … … 509 509 sizer.Add( name,( iy, ix),(1,1), 510 510 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 511 ix +=1512 # Units513 try:514 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)515 except:516 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)517 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)518 511 519 512 ix += 1 … … 532 525 533 526 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 527 ix +=1 528 # Units 529 try: 530 units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT) 531 except: 532 units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT) 533 sizer.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 534 534 535 535 ##[cb state, name, value, "+/-", error of fit, min, max , units]
Note: See TracChangeset
for help on using the changeset viewer.