Ignore:
Timestamp:
Jan 26, 2021 12:48:52 PM (2 years ago)
Author:
toby
Message:

wx4.1 updates; new CIF data item; scripting: peak fit details returned; improve multistring gui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r4764 r4783  
    27522752    :param wx.Frame parent: name of parent frame
    27532753    :param str title: title string for dialog
    2754     :param str prompts: strings to tell use what they are inputting
    2755     :param str values: default input values, if any
     2754    :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
    27562756    :param int size: length of the input box in pixels
    27572757    :param bool addRows: if True, users can add rows to the table
     
    27592759    :param str hlp: if supplied, a help button is added to the dialog that
    27602760      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
    27612763    '''
    27622764    def __init__(self,parent,title,prompts,values=[],size=-1,
    2763                      addRows=False,hlp=None):
     2765                     addRows=False,hlp=None, lbl=None):
    27642766        wx.Dialog.__init__(self,parent,wx.ID_ANY,title,
    27652767                           pos=wx.DefaultPosition,
     
    27692771        self.addRows = addRows
    27702772        self.size = size
    2771         self.hlp = hlp
     2773        self.hlp = StripIndents(hlp,True)
     2774        self.lbl = lbl
    27722775        self.CenterOnParent()
    27732776        self.Paint()
     
    27792782        if self.hlp:
    27802783            btnsizer = wx.BoxSizer(wx.HORIZONTAL)
    2781             hlp = HelpButton(self,self.hlp)
     2784            hlp = HelpButton(self, self.hlp, wrap=450)
    27822785            btnsizer.Add((-1,-1),1, wx.EXPAND, 1)
    27832786            btnsizer.Add(hlp,0,wx.ALIGN_RIGHT|wx.ALL)
    27842787            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))
    27852791        promptSizer = wx.FlexGridSizer(0,2,5,5)
    27862792        promptSizer.AddGrowableCol(1,1)
     
    28222828    def Show(self):
    28232829        '''Use this method after creating the dialog to post it
     2830       
    28242831        :returns: True if the user pressed OK; False if the User pressed Cancel
    28252832        '''
     
    28302837
    28312838    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
    28342842        '''
    28352843        return self.values
Note: See TracChangeset for help on using the changeset viewer.