- Timestamp:
- Mar 1, 2015 2:23:04 AM (10 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:
- 9654baf
- Parents:
- 58c125d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/calculator/slit_length_calculator_panel.py
r79492222 r491e916 20 20 from calculator_widgets import InterActiveOutputTextCtrl 21 21 from sas.perspectives.calculator import calculator_widgets as widget 22 from sas.guiframe.documentation_window import DocumentationWindow 22 23 23 24 _BOX_WIDTH = 76 … … 25 26 if sys.platform.count("win32") > 0: 26 27 PANEL_WIDTH = 500 27 PANEL_HEIGHT = 2 0028 PANEL_HEIGHT = 210 28 29 FONT_VARIANT = 0 29 30 else: … … 121 122 self.bt_close.Bind(wx.EVT_BUTTON, self.on_close) 122 123 self.bt_close.SetToolTipString("Close this window.") 123 self.button_sizer.AddMany([(self.bt_close, 0, wx.LEFT, 390)]) 124 124 125 id = wx.NewId() 126 self.button_help = wx.Button(self, id, "HELP") 127 self.button_help.SetToolTipString("Help for slit length calculator.") 128 self.Bind(wx.EVT_BUTTON, self.on_help,id=id) 129 130 self.button_sizer.AddMany([(self.bt_close, 0, wx.LEFT, 280), 131 (self.button_help, 0, wx.LEFT, 20)]) 132 125 133 def _do_layout(self): 126 134 """ … … 160 168 161 169 return path 170 171 def on_help(self, event): 172 """ 173 Bring up the slit length calculator Documentation whenever 174 the HELP button is clicked. 175 176 Calls DocumentationWindow with the path of the location within the 177 documentation tree (after /doc/ ....". Note that when using old 178 versions of Wx (before 2.9) and thus not the release version of 179 installers, the help comes up at the top level of the file as 180 webbrowser does not pass anything past the # to the browser when it is 181 running "file:///...." 182 183 :param evt: Triggers on clicking the help button 184 """ 185 186 _TreeLocation = "user/perspectives/calculator/slit_calculator_help.html" 187 _doc_viewer = DocumentationWindow(self, -1, \ 188 _TreeLocation,"Slit Length Calculator Help") 162 189 163 190 def on_close(self, event): … … 266 293 self.panel = SlitLengthCalculatorPanel(parent=self) 267 294 self.Bind(wx.EVT_CLOSE, self.on_close) 268 self.SetPosition((25, 1 50))295 self.SetPosition((25, 10)) 269 296 self.Show(True) 270 297
Note: See TracChangeset
for help on using the changeset viewer.