Changeset 6f2c919 in sasview for sansview/perspectives/fitting/fitpage.py
- Timestamp:
- Jul 25, 2009 6:58:31 PM (15 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:
- 812b901
- Parents:
- e2da832
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
rba95543 r6f2c919 303 303 ix = 1 304 304 value= self.model.getParam(name1) 305 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),305 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 306 306 style=wx.TE_PROCESS_ENTER) 307 307 ctl1.SetValue(str (format_number(value))) 308 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)309 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)310 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)311 308 self.sizer4_4.Add(ctl1, (iy,ix),(1,1),wx.EXPAND) 312 309 ## text to show error sign … … 326 323 ix = 4 327 324 value= self.model.getParam(name2) 328 Tctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),325 Tctl = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 329 326 style=wx.TE_PROCESS_ENTER) 330 327 331 328 Tctl.SetValue(str (format_number(value))) 332 Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)333 Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)334 Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)335 329 self.sizer4_4.Add(Tctl, (iy,ix),(1,1), 336 330 wx.EXPAND|wx.ADJUST_MINSIZE, 0) … … 340 334 ix = 5 341 335 value= self.model.getParam(name3) 342 Tctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),336 Tctl = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 343 337 style=wx.TE_PROCESS_ENTER) 344 338 Tctl.SetValue(str (format_number(value))) 345 Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)346 Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)347 Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)348 339 self.sizer4_4.Add(Tctl, (iy,ix),(1,1), 349 340 wx.EXPAND|wx.ADJUST_MINSIZE, 0) … … 378 369 ix = 1 379 370 value= self.model.getParam(name1) 380 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),371 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 381 372 style=wx.TE_PROCESS_ENTER) 382 373 ctl1.SetValue(str (format_number(value))) … … 385 376 else: 386 377 ctl1.Disable() 387 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)388 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)389 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)390 378 self.sizer4_4.Add(ctl1, (iy,ix),(1,1),wx.EXPAND) 391 379 ## text to show error sign … … 411 399 ix = 4 412 400 value= self.model.getParam(name2) 413 Tctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),401 Tctl = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 414 402 style=wx.TE_PROCESS_ENTER) 415 403 … … 419 407 else: 420 408 Tctl.Disable() 421 Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)422 Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)423 Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)424 409 self.sizer4_4.Add(Tctl, (iy,ix),(1,1), 425 410 wx.EXPAND|wx.ADJUST_MINSIZE, 0) … … 431 416 ix = 5 432 417 value= self.model.getParam(name3) 433 Tctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),418 Tctl = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 434 419 style=wx.TE_PROCESS_ENTER) 435 420 Tctl.SetValue(str (format_number(value))) … … 438 423 else: 439 424 Tctl.Disable() 440 Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)441 Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)442 Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)443 425 self.sizer4_4.Add(Tctl, (iy,ix),(1,1), 444 426 wx.EXPAND|wx.ADJUST_MINSIZE, 0) … … 1082 1064 ix += 1 1083 1065 value= self.model.getParam(item) 1084 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),1066 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 1085 1067 style=wx.TE_PROCESS_ENTER) 1086 1068 1087 1069 ctl1.SetValue(format_number(value)) 1088 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)1089 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)1090 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)1091 1070 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 1092 1071 ## text to show error sign … … 1104 1083 param_min, param_max= self.model.details[item][1:] 1105 1084 ix += 1 1106 ctl3 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER) 1085 ctl3 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 1086 kill_focus_callback = self._onparamRangeEnter, 1087 set_focus_callback = self._onparamRangeEnter) 1107 1088 if param_min ==None: 1108 1089 ctl3.SetValue("") 1109 1090 else: 1110 1091 ctl3.SetValue(str(param_min)) 1111 ctl3.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)1112 ctl3.Bind(wx.EVT_KILL_FOCUS, self._onparamRangeEnter)1113 ctl3.Bind(wx.EVT_TEXT_ENTER,self._onparamRangeEnter)1114 1092 sizer.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1115 1093 ctl3.Hide() 1116 1094 1117 1095 ix += 1 1118 ctl4 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER) 1119 ctl4.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 1120 ctl4.Bind(wx.EVT_KILL_FOCUS, self._onparamRangeEnter) 1121 ctl4.Bind(wx.EVT_TEXT_ENTER,self._onparamRangeEnter) 1096 ctl4 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 1097 kill_focus_callback = self._onparamRangeEnter, 1098 set_focus_callback = self._onparamRangeEnter) 1122 1099 sizer.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1123 1100 if param_max==None: … … 1162 1139 ix += 1 1163 1140 value= self.model.getParam(item) 1164 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),1141 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 1165 1142 style=wx.TE_PROCESS_ENTER) 1166 1143 … … 1170 1147 else: 1171 1148 ctl1.Disable() 1172 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)1173 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)1174 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)1175 1149 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 1176 1150 ## text to show error sign … … 1191 1165 param_min, param_max= self.model.details[item][1:] 1192 1166 ix += 1 1193 ctl3 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER) 1167 ctl3 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 1168 kill_focus_callback = self._onparamRangeEnter, 1169 set_focus_callback = self._onparamRangeEnter) 1194 1170 if param_min ==None: 1195 1171 ctl3.SetValue("") 1196 1172 else: 1197 1173 ctl3.SetValue(str(param_min)) 1198 ctl3.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)1199 ctl3.Bind(wx.EVT_KILL_FOCUS, self._onparamRangeEnter)1200 ctl3.Bind(wx.EVT_TEXT_ENTER,self._onparamRangeEnter)1201 1174 sizer.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1202 1175 ctl3.Hide() … … 1206 1179 ctl3.Disable() 1207 1180 ix += 1 1208 ctl4 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER) 1209 ctl4.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 1210 ctl4.Bind(wx.EVT_KILL_FOCUS, self._onparamRangeEnter) 1211 ctl4.Bind(wx.EVT_TEXT_ENTER,self._onparamRangeEnter) 1181 ctl4 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 1182 kill_focus_callback = self._onparamRangeEnter, 1183 set_focus_callback = self._onparamRangeEnter) 1212 1184 sizer.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1213 1185 if param_max ==None:
Note: See TracChangeset
for help on using the changeset viewer.