- Timestamp:
- Mar 1, 2015 2:46:02 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:
- 18d58a6e
- Parents:
- 491e916
- Location:
- src/sas/perspectives/calculator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/calculator/kiessig_calculator_panel.py
rb9a5f0e r9654baf 17 17 from calculator_widgets import InputTextCtrl 18 18 from sas.perspectives.calculator import calculator_widgets as widget 19 from sas.guiframe.documentation_window import DocumentationWindow 19 20 20 21 _BOX_WIDTH = 77 … … 22 23 if sys.platform.count("win32") > 0: 23 24 PANEL_WIDTH = 500 24 PANEL_HEIGHT = 2 1025 PANEL_HEIGHT = 230 25 26 FONT_VARIANT = 0 26 27 else: … … 123 124 Do the layout for the button widgets 124 125 """ 126 id = wx.NewId() 127 self.bt_help = wx.Button(self, id,'HELP') 128 self.bt_help.Bind(wx.EVT_BUTTON, self.on_help) 129 self.bt_help.SetToolTipString("Help using the Kiessig fringe calculator.") 130 125 131 self.bt_close = wx.Button(self, wx.ID_CANCEL,'Close') 126 132 self.bt_close.Bind(wx.EVT_BUTTON, self.on_close) 127 133 self.bt_close.SetToolTipString("Close this window.") 128 self.button_sizer.AddMany([(self.bt_close, 0, wx.LEFT, 390)]) 134 self.button_sizer.AddMany([(self.bt_help, 0, wx.LEFT, 260), 135 (self.bt_close, 0, wx.LEFT, 20)]) 129 136 130 137 def _do_layout(self): … … 149 156 self.SetAutoLayout(True) 150 157 158 def on_help(self, event): 159 """ 160 Bring up the Kiessig fringe calculator Documentation whenever 161 the HELP button is clicked. 162 163 Calls DocumentationWindow with the path of the location within the 164 documentation tree (after /doc/ ....". Note that when using old 165 versions of Wx (before 2.9) and thus not the release version of 166 installers, the help comes up at the top level of the file as 167 webbrowser does not pass anything past the # to the browser when it is 168 running "file:///...." 169 170 :param evt: Triggers on clicking the help button 171 """ 172 173 _TreeLocation = "user/perspectives/calculator/kiessig_calculator_help.html" 174 _doc_viewer = DocumentationWindow(self, -1, \ 175 _TreeLocation,"Density/Volume Calculator Help") 176 151 177 def on_close(self, event): 152 178 """ … … 202 228 self.panel = KiessigThicknessCalculatorPanel(parent=self) 203 229 self.Bind(wx.EVT_CLOSE, self.on_close) 204 self.SetPosition((25, 1 60))230 self.SetPosition((25, 10)) 205 231 self.Show(True) 206 232 -
src/sas/perspectives/calculator/slit_length_calculator_panel.py
r491e916 r9654baf 128 128 self.Bind(wx.EVT_BUTTON, self.on_help,id=id) 129 129 130 self.button_sizer.AddMany([(self.b t_close, 0, wx.LEFT, 280),131 (self.b utton_help, 0, wx.LEFT, 20)])130 self.button_sizer.AddMany([(self.button_help, 0, wx.LEFT, 280), 131 (self.bt_close, 0, wx.LEFT, 20)]) 132 132 133 133 def _do_layout(self):
Note: See TracChangeset
for help on using the changeset viewer.