Changeset 58c125d in sasview
- Timestamp:
- Mar 1, 2015 1:55:51 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:
- 491e916
- Parents:
- 33f551f
- Location:
- src/sas/perspectives/calculator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/calculator/density_panel.py
r79492222 r58c125d 11 11 from periodictable import formula as Formula 12 12 from sas.perspectives.calculator import calculator_widgets as widget 13 from sas.guiframe.documentation_window import DocumentationWindow 13 14 14 15 AVOGADRO = 6.02214129e23 … … 205 206 self.Bind(wx.EVT_BUTTON, self.calculate, id=id) 206 207 207 sizer_button.Add((250, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 208 id = wx.NewId() 209 self.button_help = wx.Button(self, id, "HELP") 210 self.button_help.SetToolTipString("Help for density calculator.") 211 self.Bind(wx.EVT_BUTTON, self.on_help, id=id) 212 213 sizer_button.Add((150, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) 208 214 sizer_button.Add(self.button_calculate, 0, 215 wx.RIGHT|wx.ADJUST_MINSIZE, 20) 216 sizer_button.Add(self.button_help, 0, 209 217 wx.RIGHT|wx.ADJUST_MINSIZE, 20) 210 218 sizer3.Add(sizer_button) … … 352 360 event.Skip() 353 361 362 def on_help(self, event): 363 """ 364 Bring up the density/volume calculator Documentation whenever 365 the HELP button is clicked. 366 367 Calls DocumentationWindow with the path of the location within the 368 documentation tree (after /doc/ ....". Note that when using old 369 versions of Wx (before 2.9) and thus not the release version of 370 installers, the help comes up at the top level of the file as 371 webbrowser does not pass anything past the # to the browser when it is 372 running "file:///...." 373 374 :param evt: Triggers on clicking the help button 375 """ 376 377 _TreeLocation = "user/perspectives/calculator/density_calculator_help.html" 378 _doc_viewer = DocumentationWindow(self, -1, \ 379 _TreeLocation,"Density/Volume Calculator Help") 380 354 381 def clear_outputs(self): 355 382 """ … … 377 404 def __init__(self, parent=None, title="Density/Volume Calculator", 378 405 base=None, manager=None, 379 size=(PANEL_SIZE , PANEL_SIZE/1.7), *args, **kwds):406 size=(PANEL_SIZE*1.05, PANEL_SIZE/1.55), *args, **kwds): 380 407 """ 381 408 """ … … 388 415 self.panel = DensityPanel(self, base=base) 389 416 self.Bind(wx.EVT_CLOSE, self.on_close) 390 self.SetPosition((25, 1 60))417 self.SetPosition((25, 10)) 391 418 self.Show(True) 392 419
Note: See TracChangeset
for help on using the changeset viewer.