Changeset a20a255 in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Jul 25, 2018 2:54:43 PM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
ddb036e5
Parents:
c1790a5
Message:

Add a help button to the slicer parameters panel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_slicer.py

    ra26f67f ra20a255  
    251251            self.bck.Add(self.batch_slicer_button, (iy, ix), (1, 1), 
    252252                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
     253            # Help button 
     254 
     255            self.bt_help = wx.Button(self, wx.NewId(), "HELP") 
     256            self.bt_help.SetToolTipString( 
     257                "Help for the slicer parameters and batch slicing.") 
     258            self.bck.Add(self.bt_help, (iy, 1), (1, 1), 
     259                         wx.ALIGN_RIGHT | wx.ADJUST_MINSIZE, 15) 
     260            wx.EVT_BUTTON(self, self.bt_help.GetId(), self.on_help) 
     261 
    253262            iy += 1 
    254263            self.bck.Add((5, 5), (iy, ix), (1, 1), 
    255264                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 5) 
     265 
    256266        self.bck.Layout() 
    257267        self.bck.Fit(self) 
     
    535545            self.default_value += "_{0}".format(key).split(" [")[0] 
    536546            self.default_value += "-{:.2f}".format(params[key]) 
     547 
     548    def on_help(self, event=None): 
     549        """ 
     550        Opens a help window for the slicer parameters/batch slicing window 
     551        :param event: 
     552        :return: 
     553        """ 
     554        from sas.sasgui.guiframe.documentation_window import DocumentationWindow 
     555 
     556        _TreeLocation = "user/sasgui/guiframe/graph_help.html" 
     557        _doc_viewer = DocumentationWindow(self, wx.ID_ANY, _TreeLocation, 
     558                                          "#d-data-averaging", 
     559                                          "Data Explorer Help") 
Note: See TracChangeset for help on using the changeset viewer.