Changes in / [9f7fbd9:f552ff3] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/pr/inversion_panel.py
rc1bffa5 rdea2f6e 16 16 from pr_widgets import DataFileTextCtrl 17 17 from pr_widgets import OutputTextCtrl 18 from sas.guiframe.documentation_window import DocumentationWindow 18 19 19 20 if sys.platform.count("win32") > 0: … … 675 676 self.Bind(wx.EVT_BUTTON, self._on_invert, id=wx_id) 676 677 678 # self.button_help = wx.Button(self, -1, "HELP") 679 # app_tip = "Get help on P(r) inversion." 680 # self.button_help.SetToolTipString(app_tip) 681 # self.button_help.Bind(wx.EVT_BUTTON, self.on_help) 682 677 683 self._set_reset_flag(True) 678 684 self._set_save_flag(True) … … 680 686 sizer_button.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 681 687 sizer_button.Add(button_ok, 0, wx.LEFT | wx.ADJUST_MINSIZE, 10) 688 # sizer_button.Add(self.button_help, 0, wx.LEFT | wx.ADJUST_MINSIZE, 10) 682 689 683 690 iy_vb += 1 … … 936 943 logging.error(msg) 937 944 938 class HelpDialog(wx.Dialog): 945 def on_help(self, event): 946 """ 947 Bring up the P(r) Documentation whenever 948 the HELP button is clicked. 949 950 Calls DocumentationWindow with the path of the location within the 951 documentation tree (after /doc/ ....". Note that when using old 952 versions of Wx (before 2.9) and thus not the release version of 953 installers, the help comes up at the top level of the file as 954 webbrowser does not pass anything past the # to the browser when it is 955 running "file:///...." 956 957 :param evt: Triggers on clicking the help button 939 958 """ 940 """ 941 def __init__(self, parent, id): 942 """ 943 """ 944 from sas.pr.invertor import help 945 wx.Dialog.__init__(self, parent, id, size=(400, 450)) 946 self.SetTitle("P(r) help") 947 self.SetWindowVariant(variant=FONT_VARIANT) 948 949 vbox = wx.BoxSizer(wx.VERTICAL) 950 951 explanation = help() 952 953 label_explain = wx.StaticText(self, -1, explanation, size=(360, 350)) 954 955 vbox.Add(label_explain, 0, wx.ALL | wx.EXPAND, 15) 956 957 958 static_line = wx.StaticLine(self, -1) 959 vbox.Add(static_line, 0, wx.EXPAND, 0) 960 961 button_ok = wx.Button(self, wx.ID_OK, "OK") 962 963 sizer_button = wx.BoxSizer(wx.HORIZONTAL) 964 sizer_button.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 965 sizer_button.Add(button_ok, 0, wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10) 966 967 vbox.Add(sizer_button, 0, wx.EXPAND | wx.BOTTOM | wx.TOP, 10) 968 969 self.SetSizer(vbox) 970 self.SetAutoLayout(True) 971 972 self.Layout() 973 self.Centre() 959 960 _TreeLocation = "user/perspectives/pr/pr_help.html" 961 _doc_viewer = DocumentationWindow(self, -1, \ 962 _TreeLocation, "P(r) Help") 963 964 965 966 #class HelpDialog(wx.Dialog): 967 # """ 968 # """ 969 # def __init__(self, parent, id): 970 # """ 971 # """ 972 # from sas.pr.invertor import help 973 # wx.Dialog.__init__(self, parent, id, size=(400, 450)) 974 # self.SetTitle("P(r) help") 975 # self.SetWindowVariant(variant=FONT_VARIANT) 976 # 977 # vbox = wx.BoxSizer(wx.VERTICAL) 978 # 979 # explanation = help() 980 # 981 # label_explain = wx.StaticText(self, -1, explanation, size=(360, 350)) 982 # 983 # vbox.Add(label_explain, 0, wx.ALL | wx.EXPAND, 15) 984 # 985 # 986 # static_line = wx.StaticLine(self, -1) 987 # vbox.Add(static_line, 0, wx.EXPAND, 0) 988 # 989 # button_ok = wx.Button(self, wx.ID_OK, "OK") 990 # 991 # sizer_button = wx.BoxSizer(wx.HORIZONTAL) 992 # sizer_button.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 993 # sizer_button.Add(button_ok, 0, wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10) 994 # 995 # vbox.Add(sizer_button, 0, wx.EXPAND | wx.BOTTOM | wx.TOP, 10) 996 # 997 # self.SetSizer(vbox) 998 # self.SetAutoLayout(True) 999 # 1000 # self.Layout() 1001 # self.Centre() 974 1002 975 1003 class PrDistDialog(wx.Dialog):
Note: See TracChangeset
for help on using the changeset viewer.