Changeset 56e99f9 in sasview for src/sas


Ignore:
Timestamp:
Jun 13, 2015 10:39:16 PM (10 years ago)
Author:
butler
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:
4faed25
Parents:
e82a901
Message:

add help button to batch Grid Panel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/guiframe/data_processor.py

    r76aed53 r56e99f9  
    1818from sas.plottools import plottables 
    1919from sas.guiframe.dataFitting import Data1D 
     20 
    2021 
    2122FUNC_DICT = {"sqrt": "math.sqrt", 
     
    11301131            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, info="error")) 
    11311132 
     1133    def on_help(self, event): 
     1134        """ 
     1135        Bring up the Batch Grid Panel Usage Documentation whenever 
     1136        the HELP button is clicked. 
     1137 
     1138        Calls DocumentationWindow with the path of the location within the 
     1139        documentation tree (after /doc/ ....".  Note that when using old 
     1140        versions of Wx (before 2.9) and thus not the release version of 
     1141        installers, the help comes up at the top level of the file as 
     1142        webbrowser does not pass anything past the # to the browser when it is 
     1143        running "file:///...." 
     1144 
     1145    :param evt: Triggers on clicking the help button 
     1146    """ 
     1147        #import documentation window here to avoid circular imports 
     1148        #if put at top of file with rest of imports. 
     1149        from documentation_window import DocumentationWindow 
     1150 
     1151        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
     1152        _PageAnchor = "#batch-fit-mode" 
     1153        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, _PageAnchor, 
     1154                                          "Batch Mode Help") 
     1155 
    11321156    def get_sentence(self, dict, sentence, column_names): 
    11331157        """ 
     
    11861210 
    11871211        self.plot_button.SetToolTipString(plot_tip) 
     1212 
     1213        self.help_button = wx.Button(self, -1, "HELP") 
     1214        self.help_button.SetToolTipString("Get Help for Batch Mode") 
     1215        self.help_button.Bind(wx.EVT_BUTTON, self.on_help) 
     1216 
    11881217        boxsizer1.AddMany([(note_text, 0, wx.LEFT, 10), 
    11891218                           (self.view_button, 0, wx.LEFT | wx.RIGHT, 10)]) 
     
    11911220                                    wx.LEFT | wx.RIGHT | wx.BOTTOM, 10), 
    11921221                                   (self.plot_button, 0, 
    1193                                     wx.LEFT | wx.TOP | wx.BOTTOM | wx.EXPAND, 12)]) 
     1222                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12), 
     1223                                   (self.help_button,0,  
     1224                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12)]) 
    11941225 
    11951226        wx.EVT_BUTTON(self, self.plot_button.GetId(), self.on_plot) 
Note: See TracChangeset for help on using the changeset viewer.