Changeset 4783 for trunk/GSASIIctrlGUI.py
- Timestamp:
- Jan 26, 2021 12:48:52 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r4764 r4783 2752 2752 :param wx.Frame parent: name of parent frame 2753 2753 :param str title: title string for dialog 2754 :param str prompts: strings to tell usewhat they are inputting2755 :param str values:default input values, if any2754 :param list prompts: list of strings to tell user what they are inputting 2755 :param list values: list of str default input values, if any 2756 2756 :param int size: length of the input box in pixels 2757 2757 :param bool addRows: if True, users can add rows to the table … … 2759 2759 :param str hlp: if supplied, a help button is added to the dialog that 2760 2760 can be used to display the supplied help text in this variable. 2761 :param str lbl: label placed at top of dialog 2762 :returns: a wx.Dialog instance 2761 2763 ''' 2762 2764 def __init__(self,parent,title,prompts,values=[],size=-1, 2763 addRows=False,hlp=None ):2765 addRows=False,hlp=None, lbl=None): 2764 2766 wx.Dialog.__init__(self,parent,wx.ID_ANY,title, 2765 2767 pos=wx.DefaultPosition, … … 2769 2771 self.addRows = addRows 2770 2772 self.size = size 2771 self.hlp = hlp 2773 self.hlp = StripIndents(hlp,True) 2774 self.lbl = lbl 2772 2775 self.CenterOnParent() 2773 2776 self.Paint() … … 2779 2782 if self.hlp: 2780 2783 btnsizer = wx.BoxSizer(wx.HORIZONTAL) 2781 hlp = HelpButton(self, self.hlp)2784 hlp = HelpButton(self, self.hlp, wrap=450) 2782 2785 btnsizer.Add((-1,-1),1, wx.EXPAND, 1) 2783 2786 btnsizer.Add(hlp,0,wx.ALIGN_RIGHT|wx.ALL) 2784 2787 mainSizer.Add(btnsizer,0,wx.EXPAND) 2788 if self.lbl: 2789 mainSizer.Add(wx.StaticText(self,wx.ID_ANY,self.lbl),0,WACV,0) 2790 mainSizer.Add((-1,15)) 2785 2791 promptSizer = wx.FlexGridSizer(0,2,5,5) 2786 2792 promptSizer.AddGrowableCol(1,1) … … 2822 2828 def Show(self): 2823 2829 '''Use this method after creating the dialog to post it 2830 2824 2831 :returns: True if the user pressed OK; False if the User pressed Cancel 2825 2832 ''' … … 2830 2837 2831 2838 def GetValues(self): 2832 '''Use this method to get the value entered by the user 2833 :returns: string entered by user 2839 '''Use this method to get the value(s) entered by the user 2840 2841 :returns: a list of strings entered by user 2834 2842 ''' 2835 2843 return self.values
Note: See TracChangeset
for help on using the changeset viewer.