Changeset 6f2c919 in sasview for sansview/perspectives/fitting/modelpage.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/modelpage.py
re7b1ccf r6f2c919 84 84 sizer_npts= wx.GridSizer(1, 1,5, 5) 85 85 86 self.npts = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))86 self.npts = BasicPage.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20)) 87 87 self.npts.SetValue(format_number(self.num_points)) 88 88 self.npts.SetToolTipString("Number of point to plot.") 89 self.npts.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)90 self.npts.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)91 self.npts.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter)92 89 93 90 sizer_npts.Add(wx.StaticText(self, -1, 'Npts'),1, wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 5) … … 173 170 ix = 1 174 171 value= self.model.getParam(name1) 175 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),172 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 176 173 style=wx.TE_PROCESS_ENTER) 177 174 ctl1.SetValue(str (format_number(value))) 178 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)179 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)180 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)181 175 self.sizer4_4.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 182 176 self.fittable_param.append([None,name1,ctl1,None, … … 185 179 ix =2 186 180 value= self.model.getParam(name2) 187 Tctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),181 Tctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 188 182 style=wx.TE_PROCESS_ENTER) 189 183 Tctl1.SetValue(str (format_number(value))) 190 Tctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)191 Tctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)192 Tctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)193 184 self.sizer4_4.Add(Tctl1, (iy,ix),(1,1), 194 185 wx.EXPAND|wx.ADJUST_MINSIZE, 0) … … 198 189 ix =3 199 190 value= self.model.getParam(name3) 200 Tctl2 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),191 Tctl2 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 201 192 style=wx.TE_PROCESS_ENTER) 202 193 Tctl2.SetValue(str (format_number(value))) 203 Tctl2.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)204 Tctl2.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)205 Tctl2.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)206 194 self.sizer4_4.Add(Tctl2, (iy,ix),(1,1), 207 195 wx.EXPAND|wx.ADJUST_MINSIZE, 0) … … 226 214 ix = 1 227 215 value= self.model.getParam(name1) 228 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),216 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 229 217 style=wx.TE_PROCESS_ENTER) 230 218 ctl1.SetValue(str (format_number(value))) 231 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)232 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)233 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)234 219 if not self.enable2D: 235 220 ctl1.Disable() … … 244 229 ix =2 245 230 value= self.model.getParam(name2) 246 Tctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),231 Tctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 247 232 style=wx.TE_PROCESS_ENTER) 248 233 Tctl1.SetValue(str (format_number(value))) 249 Tctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)250 Tctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)251 Tctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)252 234 if not self.enable2D: 253 235 Tctl1.Disable() … … 263 245 ix =3 264 246 value= self.model.getParam(name3) 265 Tctl2 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20),247 Tctl2 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 266 248 style=wx.TE_PROCESS_ENTER) 267 249 Tctl2.SetValue(str (format_number(value))) 268 Tctl2.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)269 Tctl2.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)270 Tctl2.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)271 250 if not self.enable2D: 272 251 Tctl2.Disable() … … 506 485 ix += 1 507 486 value= self.model.getParam(item) 508 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),487 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 509 488 style=wx.TE_PROCESS_ENTER) 510 489 511 490 ctl1.SetValue(str (format_number(value))) 512 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)513 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)514 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)515 491 516 492 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) … … 537 513 ix += 1 538 514 value= self.model.getParam(item) 539 ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20),515 ctl1 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH,20), 540 516 style=wx.TE_PROCESS_ENTER) 541 517 … … 545 521 else: 546 522 ctl1.Enable() 547 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)548 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)549 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)550 523 551 524 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)
Note: See TracChangeset
for help on using the changeset viewer.