Changeset 3977 for trunk/GSASIIctrlGUI.py
- Timestamp:
- May 13, 2019 3:23:40 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r3973 r3977 39 39 a filter to help search through choices. 40 40 :class:`HelpButton` Creates a button labeled with a "?" that when pressed 41 displays help text in a modal message window. 41 displays help text in a modal message window 42 or web browser. 42 43 :class:`MultiColumnSelection` A dialog that builds a multicolumn table, word wrapping 43 44 is used for the 2nd, 3rd,... columns. … … 4459 4460 class HelpButton(wx.Button): 4460 4461 '''Create a help button that displays help information. 4461 The text is displayed in a modal message window. 4462 The text can be displayed in a modal message window or it can be 4463 a reference to a location in the gsasII.html help web page, in which 4464 case that page is opened in a web browser. 4462 4465 4463 4466 TODO: it might be nice if it were non-modal: e.g. it stays around until … … 4465 4468 me. 4466 4469 4467 :param parent: the panel which will be the parent of the button4470 :param parent: the panel/frame where the button will be placed 4468 4471 :param str msg: the help text to be displayed 4472 :param str helpIndex: location of the help information in the gsasII.html 4473 help file in the form of an anchor string. The URL will be 4474 constructed from: location + gsasII.html + "#" + helpIndex 4469 4475 ''' 4470 def __init__(self,parent,msg ):4476 def __init__(self,parent,msg='',helpIndex=''): 4471 4477 if sys.platform == "darwin": 4472 4478 wx.Button.__init__(self,parent,wx.ID_HELP) … … 4476 4482 self.msg=StripIndents(msg) 4477 4483 self.parent = parent 4484 self.helpIndex = helpIndex 4478 4485 def _onClose(self,event): 4479 4486 self.dlg.EndModal(wx.ID_CANCEL) 4480 4487 def _onPress(self,event): 4481 4488 'Respond to a button press by displaying the requested text' 4489 if self.helpIndex: 4490 ShowHelp(self.helpIndex,self.parent) 4491 return 4482 4492 #dlg = wx.MessageDialog(self.parent,self.msg,'Help info',wx.OK) 4483 4493 self.dlg = wx.Dialog(self.parent,wx.ID_ANY,'Help information',
Note: See TracChangeset
for help on using the changeset viewer.