Ignore:
Timestamp:
Sep 13, 2017 4:13:06 PM (4 years ago)
Author:
toby
Message:

Allow editing of proxy info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3056 r3075  
    22082208    :param str prompts: strings to tell use what they are inputting
    22092209    :param str values: default input values, if any
     2210    :param int size: length of the input box in pixels
    22102211    '''
    2211     def __init__(self,parent,title,prompts,values=[]):      #,size=(200,-1)?
     2212    def __init__(self,parent,title,prompts,values=[],size=-1):
    22122213       
    22132214        wx.Dialog.__init__(self,parent,wx.ID_ANY,title,
     
    22172218        self.prompts = prompts
    22182219        self.CenterOnParent()
    2219         self.panel = wx.Panel(self)
    22202220        mainSizer = wx.BoxSizer(wx.VERTICAL)
    22212221        promptSizer = wx.FlexGridSizer(0,2,5,5)
    22222222        self.Indx = {}
    22232223        for prompt,value in zip(prompts,values):
    2224             promptSizer.Add(wx.StaticText(self.panel,-1,prompt),0,WACV)
    2225             valItem = wx.TextCtrl(self.panel,-1,value=value,style=wx.TE_PROCESS_ENTER)
     2224            promptSizer.Add(wx.StaticText(self,-1,prompt),0,WACV)
     2225            valItem = wx.TextCtrl(self,-1,value=value,style=wx.TE_PROCESS_ENTER,size=(size,-1))
    22262226            self.Indx[valItem.GetId()] = prompt
    22272227            valItem.Bind(wx.EVT_TEXT,self.newValue)
    2228             promptSizer.Add(valItem,0,WACV)
    2229         mainSizer.Add(promptSizer,0)
     2228            promptSizer.Add(valItem,1,WACV|wx.EXPAND,1)
     2229        mainSizer.Add(promptSizer,1,wx.ALL|wx.EXPAND,1)
    22302230        btnsizer = wx.StdDialogButtonSizer()
    2231         OKbtn = wx.Button(self.panel, wx.ID_OK)
     2231        OKbtn = wx.Button(self, wx.ID_OK)
    22322232        OKbtn.SetDefault()
    22332233        btnsizer.AddButton(OKbtn)
    2234         btn = wx.Button(self.panel, wx.ID_CANCEL)
     2234        btn = wx.Button(self, wx.ID_CANCEL)
    22352235        btnsizer.AddButton(btn)
    22362236        btnsizer.Realize()
    22372237        mainSizer.Add(btnsizer,0,wx.ALIGN_CENTER)
    2238         self.panel.SetSizer(mainSizer)
    2239         self.panel.Fit()
     2238        self.SetSizer(mainSizer)
    22402239        self.Fit()
    22412240       
     
    27582757        self.GBsizer.Layout()
    27592758        self.FitInside()
    2760 
     2759       
    27612760################################################################################
    27622761def GetImportFile(G2frame, message, defaultDir="", defaultFile="", style=wx.OPEN,
Note: See TracChangeset for help on using the changeset viewer.