- Timestamp:
- Apr 1, 2009 1:02:56 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:
- 9d4e502
- Parents:
- db39b2a
- Location:
- sansview/perspectives/fitting
- Files:
-
- 7 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r59a7f2d r1328e03 354 354 out.close() 355 355 356 356 357 def onSetFocus(self, evt): 358 # Get a handle to the TextCtrl 359 widget = evt.GetEventObject() 360 # Select the whole control, after this event resolves 361 wx.CallAfter(widget.SetSelection, -1, -1) 362 return 357 363 358 364 def read_file(self, path): … … 754 760 value= float(item[2].GetValue()) 755 761 # If the value of the parameter has changed, 756 # update the model and set the is_modified flag762 # +update the model and set the is_modified flag 757 763 if value != self.model.getParam(name): 758 764 self.model.setParam(name,value) 759 765 is_modified = True 760 766 except: 761 raise 762 #msg= "Model Drawing Error:wrong value entered : %s"% sys.exc_value 763 #wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 764 #return 767 msg= "Model Drawing Error:wrong value entered : %s"% sys.exc_value 768 wx.PostEvent(self.parent.parent, StatusEvent(status = msg )) 769 return 765 770 766 771 return is_modified … … 797 802 self.SetScrollbars(20,20,200,100) 798 803 799 804 800 805 801 806 def _layout_sizer_noDipers(self): … … 916 921 self.qmin.SetValue(format_number(self.qmin_x)) 917 922 self.qmin.SetToolTipString("Minimun value of Q in linear scale.") 918 self.qmin.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)923 self.qmin.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 919 924 self.qmin.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 920 925 … … 922 927 self.qmax.SetValue(format_number(self.qmax_x)) 923 928 self.qmax.SetToolTipString("Maximum value of Q in linear scale.") 924 self.qmax.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)929 self.qmax.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 925 930 self.qmax.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 926 931 -
sansview/perspectives/fitting/fitpage.py
r59a7f2d r1328e03 252 252 253 253 ctl1.SetValue(str (format_number(value))) 254 ctl1.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)254 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 255 255 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 256 256 self.sizer4_4.Add(ctl1, (iy,ix),(1,1),wx.EXPAND) … … 277 277 278 278 Tctl.SetValue(str (format_number(value))) 279 Tctl.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)279 Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 280 280 Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 281 281 self.sizer4_4.Add(Tctl, (iy,ix),(1,1), … … 291 291 style=wx.TE_PROCESS_ENTER) 292 292 Tctl.SetValue(str (format_number(value))) 293 Tctl.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)293 Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 294 294 Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 295 295 self.sizer4_4.Add(Tctl, (iy,ix),(1,1), -
sansview/perspectives/fitting/fitpanel.py
r9853ad0 r1328e03 33 33 #Creating the default page --welcomed page 34 34 self.about_page=None 35 from sans.guiframe.welcome_panel import PanelAbout35 from welcome_panel import PanelAbout 36 36 self.about_page = PanelAbout(self, -1) 37 37 self.AddPage(self.about_page,"welcome!") -
sansview/perspectives/fitting/modelpage.py
r59a7f2d r1328e03 86 86 self.npts.SetValue(format_number(self.num_points)) 87 87 self.npts.SetToolTipString("Number of point to plot.") 88 self.npts.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)88 self.npts.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 89 89 self.npts.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 90 90 … … 169 169 170 170 ctl1.SetValue(str (format_number(value))) 171 ctl1.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)171 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 172 172 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 173 173 self.sizer4_4.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) … … 183 183 184 184 Tctl1.SetValue(str (format_number(value))) 185 Tctl1.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)185 Tctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 186 186 Tctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 187 187 self.sizer4_4.Add(Tctl1, (iy,ix),(1,1), … … 198 198 style=wx.TE_PROCESS_ENTER) 199 199 Tctl2.SetValue(str (format_number(value))) 200 Tctl2.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)200 Tctl2.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 201 201 Tctl2.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 202 202 self.sizer4_4.Add(Tctl2, (iy,ix),(1,1), … … 383 383 384 384 ctl1.SetValue(str (format_number(value))) 385 ctl1.Bind(wx.EVT_ KILL_FOCUS, self._onparamEnter)385 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) 386 386 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 387 387 388 sizer.Add(ctl1, (iy,ix),(1,1), wx.EXPAND) 388 389 -
sansview/perspectives/fitting/welcome_panel.py
r823905f r1328e03 81 81 self.static_line_1 = wx.StaticLine(self, -1) 82 82 self.label_acknowledgement = wx.StaticText(self, -1, config._acknowledgement) 83 84 85 86 83 84 self.hyperlink_license = wx.StaticText(self, -1, "Comments? Bugs? Requests?") 85 self.hyperlink_paper = wx.lib.hyperlink.HyperLinkCtrl(self, -1, 86 "Send us a ticket",URL=config._license) 87 87 # end wxGlade 88 88 89 89 # 90 90 # randomly shuffle authors' names … … 114 114 sizer_main = wx.BoxSizer(wx.VERTICAL) 115 115 sizer_header = wx.BoxSizer(wx.HORIZONTAL) 116 sizer_build = wx. GridBagSizer(0,0)116 sizer_build = wx.BoxSizer(wx.VERTICAL) 117 117 118 118 119 119 sizer_header.Add(self.bitmap_logo, 0, wx.EXPAND|wx.LEFT, 5) 120 120 121 ix = 0 122 iy = 0 123 sizer_build.Add((20,20),(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 124 iy +=1 125 sizer_build.Add(self.label_acknowledgement,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 126 iy +=1 127 sizer_build.Add(self.label_title ,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 128 ix = 0 129 iy +=1 130 sizer_build.Add(self.label_build,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 131 ix = 0 132 iy +=1 133 sizer_build.Add( self.label_copyright,(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 121 122 sizer_build.Add(self.label_acknowledgement,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 123 sizer_build.Add((5,5)) 124 sizer_build.Add(self.label_title ,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 125 sizer_build.Add(self.label_build,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 126 sizer_build.Add( self.label_copyright,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 127 sizer_build.Add((5,5)) 128 sizer_build.Add( self.hyperlink_license,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 129 sizer_build.Add( self.hyperlink_paper,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 134 130 135 131 sizer_main.Add(sizer_header, 0, wx.TOP|wx.EXPAND, 3) … … 147 143 148 144 # end of class DialogAbout 145 class HelpWindow(wx.Frame): 146 def __init__(self, parent, id, title): 147 wx.Frame.__init__(self, parent, id, title, size=(570, 400)) 148 149 150 self.page = PanelAbout(self) 151 152 self.Centre() 153 self.Show(True) 149 154 155 156 157 if __name__=="__main__": 158 app = wx.App() 159 HelpWindow(None, -1, 'HelpWindow') 160 app.MainLoop() 161
Note: See TracChangeset
for help on using the changeset viewer.